org.apache.activemq.web
Class RemoteJMXBrokerFacade

java.lang.Object
  extended by org.apache.activemq.web.BrokerFacadeSupport
      extended by org.apache.activemq.web.RemoteJMXBrokerFacade
All Implemented Interfaces:
BrokerFacade

public class RemoteJMXBrokerFacade
extends BrokerFacadeSupport

A BrokerFacade which uses a JMX-Connection to communicate with a broker


Constructor Summary
RemoteJMXBrokerFacade()
           
 
Method Summary
protected  void closeConnection()
           
protected  JMXConnector createConnection()
           
protected  Set<ObjectName> findBrokers(MBeanServerConnection connection)
          Finds all ActiveMQ-Brokers registered on a certain JMX-Server or, if a JMX-BrokerName has been set, the broker with that name.
 BrokerViewMBean getBrokerAdmin()
          Admin view of the broker.
 String getBrokerName()
          The name of the active broker (f.e.
 WebConsoleConfiguration getConfiguration()
           
protected
<T> Collection<T>
getManagedObjects(ObjectName[] names, Class<T> type)
           
 ManagementContext getManagementContext()
           
protected  MBeanServerConnection getMBeanServerConnection()
           
protected  boolean isConnectionActive(JMXConnector connector)
           
 Object newProxyInstance(ObjectName objectName, Class interfaceClass, boolean notificationBroadcaster)
           
 void purgeQueue(ActiveMQDestination destination)
          Purges the given destination
 Set queryNames(ObjectName name, QueryExp query)
           
 void setBrokerName(String brokerName)
           
 void setConfiguration(WebConsoleConfiguration configuration)
           
 void shutdown()
          Shutdown this facade aka close any open connection.
 
Methods inherited from class org.apache.activemq.web.BrokerFacadeSupport
getConnection, getConnections, getConnections, getConnector, getConnectors, getConsumersOnConnection, getDestinationByName, getDurableTopicSubscribers, getInactiveDurableTopicSubscribers, getJobScheduler, getNetworkBridges, getNetworkConnectors, getQueue, getQueueConsumers, getQueues, getScheduledJobs, getTopic, getTopics, isJobSchedulerStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteJMXBrokerFacade

public RemoteJMXBrokerFacade()
Method Detail

setBrokerName

public void setBrokerName(String brokerName)

getConfiguration

public WebConsoleConfiguration getConfiguration()

setConfiguration

public void setConfiguration(WebConsoleConfiguration configuration)

shutdown

public void shutdown()
Shutdown this facade aka close any open connection.


getBrokerAdmin

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

Returns:
not null
Throws:
Exception

getBrokerName

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

Returns:
not null
Throws:
Exception
MalformedObjectNameException

getMBeanServerConnection

protected MBeanServerConnection getMBeanServerConnection()
                                                  throws Exception
Throws:
Exception

isConnectionActive

protected boolean isConnectionActive(JMXConnector connector)

createConnection

protected JMXConnector createConnection()

closeConnection

protected void closeConnection()

findBrokers

protected Set<ObjectName> findBrokers(MBeanServerConnection connection)
                               throws IOException,
                                      MalformedObjectNameException
Finds all ActiveMQ-Brokers registered on a certain JMX-Server or, if a JMX-BrokerName has been set, the broker with that name.

Parameters:
connection - not null
Returns:
Set with ObjectName-elements
Throws:
IOException
MalformedObjectNameException

purgeQueue

public void purgeQueue(ActiveMQDestination destination)
                throws Exception
Description copied from interface: BrokerFacade
Purges the given destination

Throws:
Exception

getManagementContext

public ManagementContext getManagementContext()
Specified by:
getManagementContext in class BrokerFacadeSupport

getManagedObjects

protected <T> Collection<T> getManagedObjects(ObjectName[] names,
                                              Class<T> type)
Overrides:
getManagedObjects in class BrokerFacadeSupport

queryNames

public Set queryNames(ObjectName name,
                      QueryExp query)
               throws Exception
Specified by:
queryNames in class BrokerFacadeSupport
Throws:
Exception

newProxyInstance

public Object newProxyInstance(ObjectName objectName,
                               Class interfaceClass,
                               boolean notificationBroadcaster)
                        throws Exception
Specified by:
newProxyInstance in class BrokerFacadeSupport
Throws:
Exception


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