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  JMXConnector createConnection()
           
protected  Set 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()
           
protected  MBeanServerConnection getConnection()
           
protected  Collection getManagedObjects(ObjectName[] names, Class type)
           
 ManagementContext getManagementContext()
           
protected  boolean isConnectionActive(JMXConnector connector)
           
 void purgeQueue(ActiveMQDestination destination)
          Purges the given destination
 void setBrokerName(String brokerName)
           
 void setJmxPassword(String password)
           
 void setJmxRole(String role)
           
 void setJmxUrl(String url)
           
 void shutdown()
          Shutdown this facade aka close any open connection.
 
Methods inherited from class org.apache.activemq.web.BrokerFacadeSupport
getDestinationByName, getDurableTopicSubscribers, getQueue, getQueues, getTopic, getTopics
 
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)

setJmxUrl

public void setJmxUrl(String url)

setJmxRole

public void setJmxRole(String role)

setJmxPassword

public void setJmxPassword(String password)

shutdown

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


getBrokerAdmin

public BrokerViewMBean getBrokerAdmin()
                               throws Exception
Throws:
Exception

getConnection

protected MBeanServerConnection getConnection()
                                       throws IOException
Throws:
IOException

isConnectionActive

protected boolean isConnectionActive(JMXConnector connector)

createConnection

protected JMXConnector createConnection()

closeConnection

protected void closeConnection()

findBrokers

protected Set 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 Collection getManagedObjects(ObjectName[] names,
                                       Class type)
Overrides:
getManagedObjects in class BrokerFacadeSupport


Copyright © 2008 The Apache Software Foundation. All Rights Reserved.