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 ConnectionViewMBean
getConnection(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.ConnectorViewMBean
getConnector(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 DestinationViewMBean
getDestinationByName(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.JobSchedulerViewMBean
getJobScheduler()
Get the JobScheduler MBeanprotected <T> Collection<T>
getManagedObjects(ObjectName[] names, Class<T> type)
abstract ManagementContext
getManagementContext()
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.QueueViewMBean
getQueue(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 MBeanTopicViewMBean
getTopic(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.boolean
isJobSchedulerStarted()
abstract Object
newProxyInstance(ObjectName objectName, Class interfaceClass, boolean notificationBroadcaster)
abstract Set
queryNames(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:BrokerFacade
All queues known to the broker.- Specified by:
getQueues
in interfaceBrokerFacade
- Returns:
- not
null
- Throws:
Exception
-
getTopics
public Collection<TopicViewMBean> getTopics() throws Exception
Description copied from interface:BrokerFacade
All topics known to the broker.- Specified by:
getTopics
in interfaceBrokerFacade
- Returns:
- not
null
- Throws:
Exception
-
getTopicSubscribers
public Collection<SubscriptionViewMBean> getTopicSubscribers(String topicName) throws Exception
Description copied from interface:BrokerFacade
All active non-durable subscribers to a topic.- Specified by:
getTopicSubscribers
in 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:BrokerFacade
All active non-durable subscribers to a topic.- Specified by:
getNonDurableTopicSubscribers
in interfaceBrokerFacade
- Returns:
- not
null
- Throws:
Exception
-
getDurableTopicSubscribers
public Collection<DurableSubscriptionViewMBean> getDurableTopicSubscribers() throws Exception
Description copied from interface:BrokerFacade
Active durable subscribers to topics of the broker.- Specified by:
getDurableTopicSubscribers
in interfaceBrokerFacade
- Returns:
- not
null
- Throws:
Exception
-
getInactiveDurableTopicSubscribers
public Collection<DurableSubscriptionViewMBean> getInactiveDurableTopicSubscribers() throws Exception
Description copied from interface:BrokerFacade
Inactive durable subscribers to topics of the broker.- Specified by:
getInactiveDurableTopicSubscribers
in interfaceBrokerFacade
- Returns:
- not
null
- Throws:
Exception
-
getQueue
public QueueViewMBean getQueue(String name) throws Exception
Description copied from interface:BrokerFacade
Get the view of the queue with the specified name.- Specified by:
getQueue
in interfaceBrokerFacade
- Parameters:
name
- notnull
- Returns:
null
if no queue with this name exists- Throws:
Exception
-
getTopic
public TopicViewMBean getTopic(String name) throws Exception
Description copied from interface:BrokerFacade
Get the view of the topic with the specified name.- Specified by:
getTopic
in interfaceBrokerFacade
- Parameters:
name
- notnull
- Returns:
null
if 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:BrokerFacade
All connections to all transport connectors of the broker.- Specified by:
getConnections
in interfaceBrokerFacade
- Returns:
- not
null
- Throws:
Exception
-
getConnections
public Collection<String> getConnections(String connectorName) throws Exception
Description copied from interface:BrokerFacade
The names of all connections to a specific transport connectors of the broker.- Specified by:
getConnections
in 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:BrokerFacade
A specific connection to the broker.- Specified by:
getConnection
in 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:BrokerFacade
The names of all transport connectors of the broker (f.e. openwire, ssl)- Specified by:
getConnectors
in interfaceBrokerFacade
- Returns:
- not
null
- Throws:
Exception
-
getConnector
public ConnectorViewMBean getConnector(String name) throws Exception
Description copied from interface:BrokerFacade
A transport connectors.- Specified by:
getConnector
in interfaceBrokerFacade
- Parameters:
name
- name of the connector (f.e. openwire)- Returns:
null
if not found- Throws:
Exception
-
getNetworkConnectors
public Collection<NetworkConnectorViewMBean> getNetworkConnectors() throws Exception
Description copied from interface:BrokerFacade
The brokers network connectors.- Specified by:
getNetworkConnectors
in interfaceBrokerFacade
- Returns:
- not
null
- Throws:
Exception
-
getNetworkBridges
public Collection<NetworkBridgeViewMBean> getNetworkBridges() throws Exception
Description copied from interface:BrokerFacade
The brokers network bridges.- Specified by:
getNetworkBridges
in interfaceBrokerFacade
- Returns:
- not
null
- Throws:
Exception
-
getQueueConsumers
public Collection<SubscriptionViewMBean> getQueueConsumers(String queueName) throws Exception
Description copied from interface:BrokerFacade
All active consumers of a queue.- Specified by:
getQueueConsumers
in 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:BrokerFacade
All active producers to a queue.- Specified by:
getQueueProducers
in 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:BrokerFacade
All active producers to a topic.- Specified by:
getTopicProducers
in 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:BrokerFacade
Returns all consumers of a connection.- Specified by:
getConsumersOnConnection
in interfaceBrokerFacade
- Parameters:
connectionName
- the name of the connection, notnull
- Returns:
- not
null
- Throws:
Exception
-
getJobScheduler
public JobSchedulerViewMBean getJobScheduler() throws Exception
Description copied from interface:BrokerFacade
Get the JobScheduler MBean- Specified by:
getJobScheduler
in interfaceBrokerFacade
- Returns:
- the jobScheduler or null if not configured
- Throws:
Exception
-
getScheduledJobs
public Collection<JobFacade> getScheduledJobs() throws Exception
Description copied from interface:BrokerFacade
Get the JobScheduler MBean- Specified by:
getScheduledJobs
in interfaceBrokerFacade
- Returns:
- the jobScheduler or null if not configured
- Throws:
Exception
-
isJobSchedulerStarted
public boolean isJobSchedulerStarted()
- Specified by:
isJobSchedulerStarted
in interfaceBrokerFacade
-
-