Package org.hornetq.core.server.management

Examples of org.hornetq.core.server.management.ManagementService


            return result;
        }
    }

    private Set<String> getCoreQueueNames() {
        final ManagementService managementService = getManagementService();
        if (managementService == null) {
            return Collections.emptySet();
        } else {
            Set<String> result = new HashSet<String>();
            for (Object obj : managementService.getResources(QueueControl.class)) {
                QueueControl qc = QueueControl.class.cast(obj);
                result.add(qc.getName());
            }
            return result;
        }
View Full Code Here


      }
   }

   public boolean checkEmpty(final Queue queue, final int index) throws Exception
   {
      ManagementService managementService = server0.getManagementService();
      if (index == 1)
      {
         managementService = server1.getManagementService();
      }
      JMSQueueControl queueControl = (JMSQueueControl)managementService.getResource(ResourceNames.JMS_QUEUE + queue.getQueueName());

      Integer messageCount = queueControl.getMessageCount();

      if (messageCount > 0)
      {
View Full Code Here

      return true;
   }

   protected void checkNoSubscriptions(final Topic topic, final int index) throws Exception
   {
      ManagementService managementService = server0.getManagementService();
      if (index == 1)
      {
         managementService = server1.getManagementService();
      }
      TopicControl topicControl = (TopicControl)managementService.getResource(ResourceNames.JMS_TOPIC + topic.getTopicName());
      Assert.assertEquals(0, topicControl.getSubscriptionCount());

   }
View Full Code Here

   }

   protected void removeAllMessages(final String queueName, final int index) throws Exception
   {
      ManagementService managementService = server0.getManagementService();
      if (index == 1)
      {
         managementService = server1.getManagementService();
      }
      JMSQueueControl queueControl = (JMSQueueControl)managementService.getResource(ResourceNames.JMS_QUEUE + queueName);
      queueControl.removeMessages(null);
   }
View Full Code Here

      }
   }

   public boolean checkEmpty(final Queue queue, final int index) throws Exception
   {
      ManagementService managementService = server0.getManagementService();
      if (index == 1)
      {
         managementService = server1.getManagementService();
      }
      JMSQueueControl queueControl = (JMSQueueControl)managementService.getResource(ResourceNames.JMS_QUEUE + queue.getQueueName());

      Long messageCount = queueControl.getMessageCount();

      if (messageCount > 0)
      {
View Full Code Here

      return true;
   }

   protected void checkNoSubscriptions(final Topic topic, final int index) throws Exception
   {
      ManagementService managementService = server0.getManagementService();
      if (index == 1)
      {
         managementService = server1.getManagementService();
      }
      TopicControl topicControl = (TopicControl)managementService.getResource(ResourceNames.JMS_TOPIC + topic.getTopicName());
      Assert.assertEquals(0, topicControl.getSubscriptionCount());

   }
View Full Code Here

   }

   protected void removeAllMessages(final String queueName, final int index) throws Exception
   {
      ManagementService managementService = server0.getManagementService();
      if (index == 1)
      {
         managementService = server1.getManagementService();
      }
      JMSQueueControl queueControl = (JMSQueueControl)managementService.getResource(ResourceNames.JMS_QUEUE + queueName);
      queueControl.removeMessages(null);
   }
View Full Code Here

   public StompProtocolManager(final HornetQServer server, final List<Interceptor> interceptors)
   {
      this.server = server;
      this.executor = server.getExecutorFactory().getExecutor();
      ManagementService service = server.getManagementService();
      if (service != null)
      {
         //allow management message to pass
         destinations.add(service.getManagementAddress().toString());
         service.addNotificationListener(this);
      }
   }
View Full Code Here

   public StompProtocolManager(final HornetQServer server, final List<Interceptor> interceptors)
   {
      this.server = server;
      this.executor = server.getExecutorFactory().getExecutor();
      ManagementService service = server.getManagementService();
      if (service != null)
      {
         //allow management message to pass
         destinations.add(service.getManagementAddress().toString());
         service.addNotificationListener(this);
      }
   }
View Full Code Here

      }
   }

   public boolean checkEmpty(final Queue queue, final int index) throws Exception
   {
      ManagementService managementService = server0.getManagementService();
      if (index == 1)
      {
         managementService = server1.getManagementService();
      }
      JMSQueueControl queueControl = (JMSQueueControl)managementService.getResource(ResourceNames.JMS_QUEUE + queue.getQueueName());

      Long messageCount = queueControl.getMessageCount();

      if (messageCount > 0)
      {
View Full Code Here

TOP

Related Classes of org.hornetq.core.server.management.ManagementService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.