Class MessageBrokerView


  • public class MessageBrokerView
    extends Object
    A view into the running Broker
    • Constructor Detail

      • MessageBrokerView

        public MessageBrokerView​(BrokerService brokerService)
        Create a view of a running Broker
        Parameters:
        brokerService -
      • MessageBrokerView

        public MessageBrokerView​(String brokerName)
        Create a view of a running Broker
        Parameters:
        brokerName -
    • Method Detail

      • getBrokerName

        public String getBrokerName()
        Returns:
        the brokerName
      • getBrokerId

        public String getBrokerId()
        Returns:
        the unique id of the Broker
      • getMemoryPercentUsage

        public int getMemoryPercentUsage()
        Returns:
        the memory used by the Broker as a percentage
      • getStorePercentUsage

        public int getStorePercentUsage()
        Returns:
        the space used by the Message Store as a percentage
      • getTempPercentUsage

        public int getTempPercentUsage()
        Returns:
        the space used by the store for temporary messages as a percentage
      • getJobSchedulerStorePercentUsage

        public int getJobSchedulerStorePercentUsage()
        Returns:
        the space used by the store of scheduled messages
      • isPersistent

        public boolean isPersistent()
        Returns:
        true if the Broker isn't using an in-memory store only for messages
      • getDestinations

        public Set<ActiveMQDestination> getDestinations()
        Retrieve a set of all Destinations be used by the Broker
        Returns:
        all Destinations
      • getTopics

        public Set<ActiveMQTopic> getTopics()
        Retrieve a set of all Topics be used by the Broker
        Returns:
        all Topics
      • getQueues

        public Set<ActiveMQQueue> getQueues()
        Retrieve a set of all Queues be used by the Broker
        Returns:
        all Queues
      • getTempTopics

        public Set<ActiveMQTempTopic> getTempTopics()
        Retrieve a set of all TemporaryTopics be used by the Broker
        Returns:
        all TemporaryTopics
      • getTempQueues

        public Set<ActiveMQTempQueue> getTempQueues()
        Retrieve a set of all TemporaryQueues be used by the Broker
        Returns:
        all TemporaryQueues
      • getDestinationView

        public BrokerDestinationView getDestinationView​(String destinationName)
                                                 throws Exception
        It will be assumed the destinationName is prepended with topic:// or queue:// - but will default to a Queue
        Parameters:
        destinationName -
        Returns:
        the BrokerDestinationView associated with the destinationName
        Throws:
        Exception
      • getTopicDestinationView

        public BrokerDestinationView getTopicDestinationView​(String destinationName)
                                                      throws Exception
        Get the BrokerDestinationView associated with the topic
        Parameters:
        destinationName -
        Returns:
        BrokerDestinationView
        Throws:
        Exception
      • getQueueDestinationView

        public BrokerDestinationView getQueueDestinationView​(String destinationName)
                                                      throws Exception
        Get the BrokerDestinationView associated with the queue
        Parameters:
        destinationName -
        Returns:
        BrokerDestinationView
        Throws:
        Exception
      • getDestinationView

        public BrokerDestinationView getDestinationView​(String destinationName,
                                                        byte type)
                                                 throws Exception
        Get the BrokerDestinationView associated with destination
        Parameters:
        destinationName -
        type - expects either ActiveMQDestination.QUEUE_TYPE, ActiveMQDestination.TOPIC_TYPE etc
        Returns:
        BrokerDestinationView
        Throws:
        Exception