org.fusesource.fabric.activemq.facade
Class JmxTemplateBrokerFacade

java.lang.Object
  extended by org.fusesource.fabric.activemq.facade.JmxTemplateBrokerFacade
All Implemented Interfaces:
BrokerFacade

public class JmxTemplateBrokerFacade
extends java.lang.Object
implements BrokerFacade


Constructor Summary
JmxTemplateBrokerFacade(JmxTemplateSupport template)
           
 
Method Summary
<T> T
execute(BrokerFacadeCallback<T> callback)
          Executes a JMX operation on a BrokerFacade
 BrokerViewFacade getBrokerAdmin()
          Admin view of the broker.
 java.lang.String getBrokerName()
          The name of the active broker (f.e.
 BrokerFacade[] getBrokers()
          Returns all the available brokers.
 ConnectionViewFacade getConnection(java.lang.String connectionName)
          A specific connection to the broker.
 java.util.Collection<ConnectionViewFacade> getConnections()
          All connections to all transport connectors of the broker.
 java.util.Collection<java.lang.String> getConnections(java.lang.String connectorName)
          The names of all connections to a specific transport connectors of the broker.
 ConnectorViewFacade getConnector(java.lang.String name)
          A transport connectors.
 java.util.Collection<java.lang.String> getConnectors()
          The names of all transport connectors of the broker (f.e.
 java.util.Collection<SubscriptionViewFacade> getConsumersOnConnection(java.lang.String connectionName)
          Returns all consumers of a connection.
 java.util.Collection<DurableSubscriptionViewFacade> getDurableTopicSubscribers()
          Active durable subscribers to topics of the broker.
 java.lang.String getId()
           
 java.util.Collection<DurableSubscriptionViewFacade> getInactiveDurableTopicSubscribers()
          Inactive durable subscribers to topics of the broker.
 JobSchedulerViewFacade getJobScheduler()
          Get the JobScheduler MBean
 java.util.Collection<NetworkBridgeViewFacade> getNetworkBridges()
          The brokers network bridges.
 java.util.Collection<NetworkConnectorViewFacade> getNetworkConnectors()
          The brokers network connectors.
 QueueViewFacade getQueue(java.lang.String name)
          Get the view of the queue with the specified name.
 java.util.Collection<SubscriptionViewFacade> getQueueConsumers(java.lang.String queueName)
          All active consumers of a queue.
 java.util.Collection<ProducerViewFacade> getQueueProducers(java.lang.String queueName)
          Returns the producers available on the given queue
 java.util.Collection<QueueViewFacade> getQueues()
          All queues known to the broker.
 java.util.Collection<JobFacade> getScheduledJobs()
          Get the JobScheduler MBean
 TopicViewFacade getTopic(java.lang.String name)
          Get the view of the topic with the specified name.
 java.util.Collection<SubscriptionViewFacade> getTopicConsumers(java.lang.String topicName)
          Returns the consumers available on the given topic
 java.util.Collection<DurableSubscriptionViewFacade> getTopicDurableConsumers(java.lang.String topicName)
          Returns the durable consumers available on the given topic
 java.util.Collection<ProducerViewFacade> getTopicProducers(java.lang.String topicName)
          Returns the producers available on the given topic
 java.util.Collection<TopicViewFacade> getTopics()
          All topics known to the broker.
 boolean isJobSchedulerStarted()
           
 void purgeQueue(org.apache.activemq.command.ActiveMQDestination destination)
          Purges the given destination
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmxTemplateBrokerFacade

public JmxTemplateBrokerFacade(JmxTemplateSupport template)
Method Detail

execute

public <T> T execute(BrokerFacadeCallback<T> callback)
Executes a JMX operation on a BrokerFacade


getId

public java.lang.String getId()
                       throws java.lang.Exception
Specified by:
getId in interface BrokerFacade
Returns:
a unique id for this resource, typically a JMX ObjectName
Throws:
java.lang.Exception

getBrokers

public BrokerFacade[] getBrokers()
                          throws java.lang.Exception
Description copied from interface: BrokerFacade
Returns all the available brokers.

Specified by:
getBrokers in interface BrokerFacade
Returns:
not null
Throws:
java.lang.Exception

getBrokerAdmin

public BrokerViewFacade getBrokerAdmin()
                                throws java.lang.Exception
Description copied from interface: BrokerFacade
Admin view of the broker.

Specified by:
getBrokerAdmin in interface BrokerFacade
Returns:
not null
Throws:
java.lang.Exception

getBrokerName

public java.lang.String getBrokerName()
                               throws java.lang.Exception
Description copied from interface: BrokerFacade
The name of the active broker (f.e. 'localhost' or 'my broker').

Specified by:
getBrokerName in interface BrokerFacade
Returns:
not null
Throws:
java.lang.Exception

getQueues

public java.util.Collection<QueueViewFacade> getQueues()
                                                throws java.lang.Exception
Description copied from interface: BrokerFacade
All queues known to the broker.

Specified by:
getQueues in interface BrokerFacade
Returns:
not null
Throws:
java.lang.Exception

getTopics

public java.util.Collection<TopicViewFacade> getTopics()
                                                throws java.lang.Exception
Description copied from interface: BrokerFacade
All topics known to the broker.

Specified by:
getTopics in interface BrokerFacade
Returns:
not null
Throws:
java.lang.Exception

getQueueConsumers

public java.util.Collection<SubscriptionViewFacade> getQueueConsumers(java.lang.String queueName)
                                                               throws java.lang.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:
java.lang.Exception

getTopicConsumers

public java.util.Collection<SubscriptionViewFacade> getTopicConsumers(java.lang.String topicName)
                                                               throws java.lang.Exception
Description copied from interface: BrokerFacade
Returns the consumers available on the given topic

Specified by:
getTopicConsumers in interface BrokerFacade
Throws:
java.lang.Exception

getTopicDurableConsumers

public java.util.Collection<DurableSubscriptionViewFacade> getTopicDurableConsumers(java.lang.String topicName)
                                                                             throws java.lang.Exception
Description copied from interface: BrokerFacade
Returns the durable consumers available on the given topic

Specified by:
getTopicDurableConsumers in interface BrokerFacade
Throws:
java.lang.Exception

getDurableTopicSubscribers

public java.util.Collection<DurableSubscriptionViewFacade> getDurableTopicSubscribers()
                                                                               throws java.lang.Exception
Description copied from interface: BrokerFacade
Active durable subscribers to topics of the broker.

Specified by:
getDurableTopicSubscribers in interface BrokerFacade
Returns:
not null
Throws:
java.lang.Exception

getInactiveDurableTopicSubscribers

public java.util.Collection<DurableSubscriptionViewFacade> getInactiveDurableTopicSubscribers()
                                                                                       throws java.lang.Exception
Description copied from interface: BrokerFacade
Inactive durable subscribers to topics of the broker.

Specified by:
getInactiveDurableTopicSubscribers in interface BrokerFacade
Returns:
not null
Throws:
java.lang.Exception

getQueueProducers

public java.util.Collection<ProducerViewFacade> getQueueProducers(java.lang.String queueName)
                                                           throws java.lang.Exception
Description copied from interface: BrokerFacade
Returns the producers available on the given queue

Specified by:
getQueueProducers in interface BrokerFacade
Throws:
java.lang.Exception

getTopicProducers

public java.util.Collection<ProducerViewFacade> getTopicProducers(java.lang.String topicName)
                                                           throws java.lang.Exception
Description copied from interface: BrokerFacade
Returns the producers available on the given topic

Specified by:
getTopicProducers in interface BrokerFacade
Throws:
java.lang.Exception

getConnectors

public java.util.Collection<java.lang.String> getConnectors()
                                                     throws java.lang.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:
java.lang.Exception

getConnector

public ConnectorViewFacade getConnector(java.lang.String name)
                                 throws java.lang.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:
java.lang.Exception

getConnections

public java.util.Collection<ConnectionViewFacade> getConnections()
                                                          throws java.lang.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:
java.lang.Exception

getConnections

public java.util.Collection<java.lang.String> getConnections(java.lang.String connectorName)
                                                      throws java.lang.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:
java.lang.Exception
See Also:
BrokerFacade.getConnection(String)

getConnection

public ConnectionViewFacade getConnection(java.lang.String connectionName)
                                   throws java.lang.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:
java.lang.Exception

getConsumersOnConnection

public java.util.Collection<SubscriptionViewFacade> getConsumersOnConnection(java.lang.String connectionName)
                                                                      throws java.lang.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:
java.lang.Exception

getNetworkConnectors

public java.util.Collection<NetworkConnectorViewFacade> getNetworkConnectors()
                                                                      throws java.lang.Exception
Description copied from interface: BrokerFacade
The brokers network connectors.

Specified by:
getNetworkConnectors in interface BrokerFacade
Returns:
not null
Throws:
java.lang.Exception

getNetworkBridges

public java.util.Collection<NetworkBridgeViewFacade> getNetworkBridges()
                                                                throws java.lang.Exception
Description copied from interface: BrokerFacade
The brokers network bridges.

Specified by:
getNetworkBridges in interface BrokerFacade
Returns:
not null
Throws:
java.lang.Exception

purgeQueue

public void purgeQueue(org.apache.activemq.command.ActiveMQDestination destination)
                throws java.lang.Exception
Description copied from interface: BrokerFacade
Purges the given destination

Specified by:
purgeQueue in interface BrokerFacade
Throws:
java.lang.Exception

getQueue

public QueueViewFacade getQueue(java.lang.String name)
                         throws java.lang.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:
java.lang.Exception

getTopic

public TopicViewFacade getTopic(java.lang.String name)
                         throws java.lang.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:
java.lang.Exception

getJobScheduler

public JobSchedulerViewFacade getJobScheduler()
                                       throws java.lang.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:
java.lang.Exception

getScheduledJobs

public java.util.Collection<JobFacade> getScheduledJobs()
                                                 throws java.lang.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:
java.lang.Exception

isJobSchedulerStarted

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


Copyright © 2013 Red Hat. All Rights Reserved.