Package org.apache.activemq.web
Class BrokerFacadeSupport
- java.lang.Object
-
- org.apache.activemq.web.BrokerFacadeSupport
-
- All Implemented Interfaces:
BrokerFacade
- Direct Known Subclasses:
LocalBrokerFacade,RemoteJMXBrokerFacade
public abstract class BrokerFacadeSupport extends Object implements BrokerFacade
A useful base class for an implementation ofBrokerFacade
-
-
Constructor Summary
Constructors Constructor Description BrokerFacadeSupport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ConnectionViewMBeangetConnection(String connectionName)A specific connection to the broker.Collection<ConnectionViewMBean>getConnections()All connections to all transport connectors of the broker.Collection<String>getConnections(String connectorName)The names of all connections to a specific transport connectors of the broker.ConnectorViewMBeangetConnector(String name)A transport connectors.Collection<String>getConnectors()The names of all transport connectors of the broker (f.e.Collection<SubscriptionViewMBean>getConsumersOnConnection(String connectionName)Returns all consumers of a connection.protected DestinationViewMBeangetDestinationByName(Collection<? extends DestinationViewMBean> collection, String name)Collection<DurableSubscriptionViewMBean>getDurableTopicSubscribers()Active durable subscribers to topics of the broker.Collection<DurableSubscriptionViewMBean>getInactiveDurableTopicSubscribers()Inactive durable subscribers to topics of the broker.JobSchedulerViewMBeangetJobScheduler()Get the JobScheduler MBeanprotected <T> Collection<T>getManagedObjects(ObjectName[] names, Class<T> type)abstract ManagementContextgetManagementContext()Collection<NetworkBridgeViewMBean>getNetworkBridges()The brokers network bridges.Collection<NetworkConnectorViewMBean>getNetworkConnectors()The brokers network connectors.Collection<SubscriptionViewMBean>getNonDurableTopicSubscribers()All active non-durable subscribers to a topic.QueueViewMBeangetQueue(String name)Get the view of the queue with the specified name.Collection<SubscriptionViewMBean>getQueueConsumers(String queueName)All active consumers of a queue.Collection<ProducerViewMBean>getQueueProducers(String queueName)All active producers to a queue.Collection<QueueViewMBean>getQueues()All queues known to the broker.Collection<JobFacade>getScheduledJobs()Get the JobScheduler MBeanTopicViewMBeangetTopic(String name)Get the view of the topic with the specified name.Collection<ProducerViewMBean>getTopicProducers(String topicName)All active producers to a topic.Collection<TopicViewMBean>getTopics()All topics known to the broker.Collection<SubscriptionViewMBean>getTopicSubscribers(String topicName)All active non-durable subscribers to a topic.booleanisJobSchedulerStarted()abstract ObjectnewProxyInstance(ObjectName objectName, Class interfaceClass, boolean notificationBroadcaster)abstract SetqueryNames(ObjectName name, QueryExp query)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.web.BrokerFacade
getBrokerAdmin, getBrokerName, purgeQueue
-
-
-
-
Method Detail
-
getManagementContext
public abstract ManagementContext getManagementContext()
-
queryNames
public abstract Set queryNames(ObjectName name, QueryExp query) throws Exception
- Throws:
Exception
-
newProxyInstance
public abstract Object newProxyInstance(ObjectName objectName, Class interfaceClass, boolean notificationBroadcaster) throws Exception
- Throws:
Exception
-
getQueues
public Collection<QueueViewMBean> getQueues() throws Exception
Description copied from interface:BrokerFacadeAll queues known to the broker.- Specified by:
getQueuesin interfaceBrokerFacade- Returns:
- not
null - Throws:
Exception
-
getTopics
public Collection<TopicViewMBean> getTopics() throws Exception
Description copied from interface:BrokerFacadeAll topics known to the broker.- Specified by:
getTopicsin interfaceBrokerFacade- Returns:
- not
null - Throws:
Exception
-
getTopicSubscribers
public Collection<SubscriptionViewMBean> getTopicSubscribers(String topicName) throws Exception
Description copied from interface:BrokerFacadeAll active non-durable subscribers to a topic.- Specified by:
getTopicSubscribersin interfaceBrokerFacade- Parameters:
topicName- the name of the topic, notnull- Returns:
- not
null - Throws:
Exception
-
getNonDurableTopicSubscribers
public Collection<SubscriptionViewMBean> getNonDurableTopicSubscribers() throws Exception
Description copied from interface:BrokerFacadeAll active non-durable subscribers to a topic.- Specified by:
getNonDurableTopicSubscribersin interfaceBrokerFacade- Returns:
- not
null - Throws:
Exception
-
getDurableTopicSubscribers
public Collection<DurableSubscriptionViewMBean> getDurableTopicSubscribers() throws Exception
Description copied from interface:BrokerFacadeActive durable subscribers to topics of the broker.- Specified by:
getDurableTopicSubscribersin interfaceBrokerFacade- Returns:
- not
null - Throws:
Exception
-
getInactiveDurableTopicSubscribers
public Collection<DurableSubscriptionViewMBean> getInactiveDurableTopicSubscribers() throws Exception
Description copied from interface:BrokerFacadeInactive durable subscribers to topics of the broker.- Specified by:
getInactiveDurableTopicSubscribersin interfaceBrokerFacade- Returns:
- not
null - Throws:
Exception
-
getQueue
public QueueViewMBean getQueue(String name) throws Exception
Description copied from interface:BrokerFacadeGet the view of the queue with the specified name.- Specified by:
getQueuein interfaceBrokerFacade- Parameters:
name- notnull- Returns:
nullif no queue with this name exists- Throws:
Exception
-
getTopic
public TopicViewMBean getTopic(String name) throws Exception
Description copied from interface:BrokerFacadeGet the view of the topic with the specified name.- Specified by:
getTopicin interfaceBrokerFacade- Parameters:
name- notnull- Returns:
nullif no topic with this name exists- Throws:
Exception
-
getDestinationByName
protected DestinationViewMBean getDestinationByName(Collection<? extends DestinationViewMBean> collection, String name)
-
getManagedObjects
protected <T> Collection<T> getManagedObjects(ObjectName[] names, Class<T> type) throws Exception
- Throws:
Exception
-
getConnections
public Collection<ConnectionViewMBean> getConnections() throws Exception
Description copied from interface:BrokerFacadeAll connections to all transport connectors of the broker.- Specified by:
getConnectionsin interfaceBrokerFacade- Returns:
- not
null - Throws:
Exception
-
getConnections
public Collection<String> getConnections(String connectorName) throws Exception
Description copied from interface:BrokerFacadeThe names of all connections to a specific transport connectors of the broker.- Specified by:
getConnectionsin interfaceBrokerFacade- Parameters:
connectorName- notnull- Returns:
- not
null - Throws:
Exception- See Also:
BrokerFacade.getConnection(String)
-
getConnection
public ConnectionViewMBean getConnection(String connectionName) throws Exception
Description copied from interface:BrokerFacadeA specific connection to the broker.- Specified by:
getConnectionin interfaceBrokerFacade- Parameters:
connectionName- the name of the connection, notnull- Returns:
- not
null - Throws:
Exception
-
getConnectors
public Collection<String> getConnectors() throws Exception
Description copied from interface:BrokerFacadeThe names of all transport connectors of the broker (f.e. openwire, ssl)- Specified by:
getConnectorsin interfaceBrokerFacade- Returns:
- not
null - Throws:
Exception
-
getConnector
public ConnectorViewMBean getConnector(String name) throws Exception
Description copied from interface:BrokerFacadeA transport connectors.- Specified by:
getConnectorin interfaceBrokerFacade- Parameters:
name- name of the connector (f.e. openwire)- Returns:
nullif not found- Throws:
Exception
-
getNetworkConnectors
public Collection<NetworkConnectorViewMBean> getNetworkConnectors() throws Exception
Description copied from interface:BrokerFacadeThe brokers network connectors.- Specified by:
getNetworkConnectorsin interfaceBrokerFacade- Returns:
- not
null - Throws:
Exception
-
getNetworkBridges
public Collection<NetworkBridgeViewMBean> getNetworkBridges() throws Exception
Description copied from interface:BrokerFacadeThe brokers network bridges.- Specified by:
getNetworkBridgesin interfaceBrokerFacade- Returns:
- not
null - Throws:
Exception
-
getQueueConsumers
public Collection<SubscriptionViewMBean> getQueueConsumers(String queueName) throws Exception
Description copied from interface:BrokerFacadeAll active consumers of a queue.- Specified by:
getQueueConsumersin interfaceBrokerFacade- Parameters:
queueName- the name of the queue, notnull- Returns:
- not
null - Throws:
Exception
-
getQueueProducers
public Collection<ProducerViewMBean> getQueueProducers(String queueName) throws Exception
Description copied from interface:BrokerFacadeAll active producers to a queue.- Specified by:
getQueueProducersin interfaceBrokerFacade- Parameters:
queueName- the name of the queue, notnull- Returns:
- not
null - Throws:
Exception
-
getTopicProducers
public Collection<ProducerViewMBean> getTopicProducers(String topicName) throws Exception
Description copied from interface:BrokerFacadeAll active producers to a topic.- Specified by:
getTopicProducersin interfaceBrokerFacade- Parameters:
topicName- the name of the topic, notnull- Returns:
- not
null - Throws:
Exception
-
getConsumersOnConnection
public Collection<SubscriptionViewMBean> getConsumersOnConnection(String connectionName) throws Exception
Description copied from interface:BrokerFacadeReturns all consumers of a connection.- Specified by:
getConsumersOnConnectionin interfaceBrokerFacade- Parameters:
connectionName- the name of the connection, notnull- Returns:
- not
null - Throws:
Exception
-
getJobScheduler
public JobSchedulerViewMBean getJobScheduler() throws Exception
Description copied from interface:BrokerFacadeGet the JobScheduler MBean- Specified by:
getJobSchedulerin interfaceBrokerFacade- Returns:
- the jobScheduler or null if not configured
- Throws:
Exception
-
getScheduledJobs
public Collection<JobFacade> getScheduledJobs() throws Exception
Description copied from interface:BrokerFacadeGet the JobScheduler MBean- Specified by:
getScheduledJobsin interfaceBrokerFacade- Returns:
- the jobScheduler or null if not configured
- Throws:
Exception
-
isJobSchedulerStarted
public boolean isJobSchedulerStarted()
- Specified by:
isJobSchedulerStartedin interfaceBrokerFacade
-
-