org.apache.activemq.web
Class BrokerFacadeSupport

java.lang.Object
  extended by 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 of BrokerFacade


Constructor Summary
BrokerFacadeSupport()
           
 
Method Summary
 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 MBean
protected
<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.
 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<QueueViewMBean> getQueues()
          All queues known to the broker.
 Collection<JobFacade> getScheduledJobs()
          Get the JobScheduler MBean
 TopicViewMBean getTopic(String name)
          Get the view of the topic with the specified name.
 Collection<TopicViewMBean> getTopics()
          All topics known to the broker.
 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
 

Constructor Detail

BrokerFacadeSupport

public BrokerFacadeSupport()
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 interface BrokerFacade
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 interface BrokerFacade
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 interface BrokerFacade
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 interface BrokerFacade
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 interface BrokerFacade
Parameters:
name - not null
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 interface BrokerFacade
Parameters:
name - not null
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 interface BrokerFacade
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 interface BrokerFacade
Parameters:
connectorName - not null
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 interface BrokerFacade
Parameters:
connectionName - the name of the connection, not null
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 interface BrokerFacade
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 interface BrokerFacade
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 interface BrokerFacade
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 interface BrokerFacade
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 interface BrokerFacade
Parameters:
queueName - the name of the queue, not null
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 interface BrokerFacade
Parameters:
connectionName - the name of the connection, not null
Returns:
not null
Throws:
Exception

getJobScheduler

public JobSchedulerViewMBean getJobScheduler()
                                      throws Exception
Description copied from interface: BrokerFacade
Get the JobScheduler MBean

Specified by:
getJobScheduler in interface BrokerFacade
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 interface BrokerFacade
Returns:
the jobScheduler or null if not configured
Throws:
Exception

isJobSchedulerStarted

public boolean isJobSchedulerStarted()
Specified by:
isJobSchedulerStarted in interface BrokerFacade


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.