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

Version:
$Revision: 1.1 $

Constructor Summary
RemoteJMXBrokerFacade()
           
 
Method Summary
protected  void closeConnection()
           
protected  javax.management.remote.JMXConnector createConnection()
           
protected  java.util.Set<javax.management.ObjectName> findBrokers(javax.management.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.
 org.apache.activemq.broker.jmx.BrokerViewMBean getBrokerAdmin()
          Admin view of the broker.
 java.lang.String getBrokerName()
          The name of the active broker (f.e.
 WebConsoleConfiguration getConfiguration()
           
protected
<T> java.util.Collection<T>
getManagedObjects(javax.management.ObjectName[] names, java.lang.Class<T> type)
           
 org.apache.activemq.broker.jmx.ManagementContext getManagementContext()
           
protected  javax.management.MBeanServerConnection getMBeanServerConnection()
           
protected  boolean isConnectionActive(javax.management.remote.JMXConnector connector)
           
 java.lang.Object newProxyInstance(javax.management.ObjectName objectName, java.lang.Class interfaceClass, boolean notificationBroadcaster)
           
 void purgeQueue(org.apache.activemq.command.ActiveMQDestination destination)
          Purges the given destination
 java.util.Set queryNames(javax.management.ObjectName name, javax.management.QueryExp query)
           
 void setBrokerName(java.lang.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(java.lang.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 org.apache.activemq.broker.jmx.BrokerViewMBean getBrokerAdmin()
                                                              throws java.lang.Exception
Description copied from interface: BrokerFacade
Admin view of the broker.

Returns:
not null
Throws:
java.lang.Exception

getBrokerName

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

Returns:
not null
Throws:
java.lang.Exception
javax.management.MalformedObjectNameException

getMBeanServerConnection

protected javax.management.MBeanServerConnection getMBeanServerConnection()
                                                                   throws java.lang.Exception
Throws:
java.lang.Exception

isConnectionActive

protected boolean isConnectionActive(javax.management.remote.JMXConnector connector)

createConnection

protected javax.management.remote.JMXConnector createConnection()

closeConnection

protected void closeConnection()

findBrokers

protected java.util.Set<javax.management.ObjectName> findBrokers(javax.management.MBeanServerConnection connection)
                                                          throws java.io.IOException,
                                                                 javax.management.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:
java.io.IOException
javax.management.MalformedObjectNameException

purgeQueue

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

Throws:
java.lang.Exception

getManagementContext

public org.apache.activemq.broker.jmx.ManagementContext getManagementContext()
Specified by:
getManagementContext in class BrokerFacadeSupport

getManagedObjects

protected <T> java.util.Collection<T> getManagedObjects(javax.management.ObjectName[] names,
                                                        java.lang.Class<T> type)
Overrides:
getManagedObjects in class BrokerFacadeSupport

queryNames

public java.util.Set queryNames(javax.management.ObjectName name,
                                javax.management.QueryExp query)
                         throws java.lang.Exception
Specified by:
queryNames in class BrokerFacadeSupport
Throws:
java.lang.Exception

newProxyInstance

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


Copyright © 2005-2012 FuseSource. All Rights Reserved.