org.apache.qpid.server
Class AMQBrokerManagerMBean

java.lang.Object
  extended by javax.management.StandardMBean
      extended by org.apache.qpid.server.management.DefaultManagedObject
          extended by org.apache.qpid.server.management.AMQManagedObject
              extended by org.apache.qpid.server.AMQBrokerManagerMBean
All Implemented Interfaces:
DynamicMBean, MBeanRegistration, NotificationBroadcaster, org.apache.qpid.management.common.mbeans.ManagedBroker, ManagedObject

public class AMQBrokerManagerMBean
extends AMQManagedObject
implements org.apache.qpid.management.common.mbeans.ManagedBroker

This MBean implements the broker management interface and exposes the Broker level management features like creating and deleting exchanges and queue.


Field Summary
 
Fields inherited from class org.apache.qpid.server.management.AMQManagedObject
_broadcaster, _logActor, _mbeanInfo, _notificationSequenceNumber
 
Fields inherited from interface org.apache.qpid.management.common.mbeans.ManagedBroker
TYPE
 
Fields inherited from interface org.apache.qpid.server.management.ManagedObject
DOMAIN
 
Constructor Summary
AMQBrokerManagerMBean(VirtualHostImpl.VirtualHostMBean virtualHostMBean)
           
 
Method Summary
 void createNewExchange(String exchangeName, String type, boolean durable)
          Creates new exchange and registers it with the registry.
 void createNewQueue(String queueName, String owner, boolean durable)
          Creates a new queue and registers it with the registry and puts it in persistance storage if durable queue.
 void deleteQueue(String queueName)
          Deletes the queue from queue registry and persistant storage.
 String[] getExchangeTypes()
          Returns an array of the exchange types available for creation.
 String getObjectInstanceName()
           
 ObjectName getObjectName()
          Created the ObjectName as per the JMX Specs
 ManagedObject getParentObject()
           
 List<String> retrieveQueueAttributeNames()
          Returns a list containing the names of the attributes available for the Queue mbeans.
 List<List<Object>> retrieveQueueAttributeValues(String[] attributes)
          Returns a List of Object Lists containing the requested attribute values (in the same sequence requested) for each queue in the virtualhost.
 void unregisterExchange(String exchangeName)
          Unregisters the exchange from registry.
 
Methods inherited from class org.apache.qpid.server.management.AMQManagedObject
addNotificationListener, getMBeanInfo, getNotificationInfo, removeNotificationListener
 
Methods inherited from class org.apache.qpid.server.management.DefaultManagedObject
getHierarchicalName, getHierarchicalType, getManagedObjectRegistry, getManagementInterface, getObjectNameForSingleInstanceMBean, getType, jmxEncode, register, toString, unregister
 
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AMQBrokerManagerMBean

public AMQBrokerManagerMBean(VirtualHostImpl.VirtualHostMBean virtualHostMBean)
                      throws JMException
Throws:
JMException
Method Detail

getObjectInstanceName

public String getObjectInstanceName()
Specified by:
getObjectInstanceName in interface ManagedObject
Returns:
the name that uniquely identifies this object instance. It must be unique only among objects of this type at this level in the hierarchy so the uniqueness should not be too difficult to ensure.

getExchangeTypes

public String[] getExchangeTypes()
                          throws IOException
Returns an array of the exchange types available for creation.

Specified by:
getExchangeTypes in interface org.apache.qpid.management.common.mbeans.ManagedBroker
Throws:
IOException
Since:
Qpid JMX API 1.3

retrieveQueueAttributeNames

public List<String> retrieveQueueAttributeNames()
                                         throws IOException
Returns a list containing the names of the attributes available for the Queue mbeans.

Specified by:
retrieveQueueAttributeNames in interface org.apache.qpid.management.common.mbeans.ManagedBroker
Throws:
IOException
Since:
Qpid JMX API 1.3

retrieveQueueAttributeValues

public List<List<Object>> retrieveQueueAttributeValues(String[] attributes)
                                                throws IOException
Returns a List of Object Lists containing the requested attribute values (in the same sequence requested) for each queue in the virtualhost. If a particular attribute cant be found or raises an mbean/reflection exception whilst being gathered its value is substituted with the String "-".

Specified by:
retrieveQueueAttributeValues in interface org.apache.qpid.management.common.mbeans.ManagedBroker
Throws:
IOException
Since:
Qpid JMX API 1.3

createNewExchange

public void createNewExchange(String exchangeName,
                              String type,
                              boolean durable)
                       throws JMException,
                              MBeanException
Creates new exchange and registers it with the registry.

Specified by:
createNewExchange in interface org.apache.qpid.management.common.mbeans.ManagedBroker
Parameters:
exchangeName -
type -
durable -
Throws:
JMException
MBeanException

unregisterExchange

public void unregisterExchange(String exchangeName)
                        throws JMException,
                               MBeanException
Unregisters the exchange from registry.

Specified by:
unregisterExchange in interface org.apache.qpid.management.common.mbeans.ManagedBroker
Parameters:
exchangeName -
Throws:
JMException
MBeanException

createNewQueue

public void createNewQueue(String queueName,
                           String owner,
                           boolean durable)
                    throws JMException,
                           MBeanException
Creates a new queue and registers it with the registry and puts it in persistance storage if durable queue.

Specified by:
createNewQueue in interface org.apache.qpid.management.common.mbeans.ManagedBroker
Parameters:
queueName -
durable -
owner -
Throws:
JMException
MBeanException

deleteQueue

public void deleteQueue(String queueName)
                 throws JMException,
                        MBeanException
Deletes the queue from queue registry and persistant storage.

Specified by:
deleteQueue in interface org.apache.qpid.management.common.mbeans.ManagedBroker
Parameters:
queueName -
Throws:
JMException
MBeanException

getParentObject

public ManagedObject getParentObject()
Specified by:
getParentObject in interface ManagedObject
Overrides:
getParentObject in class DefaultManagedObject

getObjectName

public ObjectName getObjectName()
                         throws MalformedObjectNameException
Description copied from class: DefaultManagedObject
Created the ObjectName as per the JMX Specs

Specified by:
getObjectName in interface ManagedObject
Overrides:
getObjectName in class DefaultManagedObject
Returns:
ObjectName
Throws:
MalformedObjectNameException


Licensed to the Apache Software Foundation