Package org.apache.activemq.broker.view
Class MessageBrokerView
- java.lang.Object
-
- org.apache.activemq.broker.view.MessageBrokerView
-
public class MessageBrokerView extends Object
A view into the running Broker
-
-
Constructor Summary
Constructors Constructor Description MessageBrokerView(String brokerName)
Create a view of a running BrokerMessageBrokerView(BrokerService brokerService)
Create a view of a running Broker
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBrokerId()
String
getBrokerName()
BrokerService
getBrokerService()
Set<ActiveMQDestination>
getDestinations()
Retrieve a set of all Destinations be used by the BrokerBrokerDestinationView
getDestinationView(String destinationName)
It will be assumed the destinationName is prepended with topic:// or queue:// - but will default to a QueueBrokerDestinationView
getDestinationView(String destinationName, byte type)
Get the BrokerDestinationView associated with destinationBrokerDestinationView
getDestinationView(ActiveMQDestination activeMQDestination)
Get the BrokerDestinationView associated with destinationint
getJobSchedulerStorePercentUsage()
int
getMemoryPercentUsage()
BrokerDestinationView
getQueueDestinationView(String destinationName)
Get the BrokerDestinationView associated with the queueSet<ActiveMQQueue>
getQueues()
Retrieve a set of all Queues be used by the Brokerint
getStorePercentUsage()
int
getTempPercentUsage()
Set<ActiveMQTempQueue>
getTempQueues()
Retrieve a set of all TemporaryQueues be used by the BrokerSet<ActiveMQTempTopic>
getTempTopics()
Retrieve a set of all TemporaryTopics be used by the BrokerBrokerDestinationView
getTopicDestinationView(String destinationName)
Get the BrokerDestinationView associated with the topicSet<ActiveMQTopic>
getTopics()
Retrieve a set of all Topics be used by the Brokerboolean
isPersistent()
-
-
-
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
-
getBrokerService
public BrokerService getBrokerService()
-
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
-
getDestinationView
public BrokerDestinationView getDestinationView(ActiveMQDestination activeMQDestination) throws Exception
Get the BrokerDestinationView associated with destination- Parameters:
activeMQDestination
-- Returns:
- BrokerDestinationView
- Throws:
Exception
-
-