org.apache.qpid.server.exchange
Class AbstractExchangeMBean<T extends AbstractExchange>

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.exchange.AbstractExchangeMBean<T>
All Implemented Interfaces:
DynamicMBean, MBeanRegistration, NotificationBroadcaster, org.apache.qpid.management.common.mbeans.ManagedExchange, ManagedObject
Direct Known Subclasses:
DirectExchangeMBean, FanoutExchangeMBean, HeadersExchangeMBean, TopicExchangeMBean

public abstract class AbstractExchangeMBean<T extends AbstractExchange>
extends AMQManagedObject
implements org.apache.qpid.management.common.mbeans.ManagedExchange

Abstract MBean class. This has some of the methods implemented from management intrerface for exchanges. Any implementaion of an Exchange MBean should extend this class.


Field Summary
protected  CompositeType _bindingDataType
           
protected  OpenType[] _bindingItemTypes
           
protected  TabularType _bindinglistDataType
           
 
Fields inherited from class org.apache.qpid.server.management.AMQManagedObject
_broadcaster, _logActor, _mbeanInfo, _notificationSequenceNumber
 
Fields inherited from interface org.apache.qpid.management.common.mbeans.ManagedExchange
BINDING_KEY, COMPOSITE_ITEM_DESCRIPTIONS, COMPOSITE_ITEM_NAMES, HDR_BINDING_NUMBER, HDR_QUEUE_BINDINGS, HDR_QUEUE_NAME, HEADERS_COMPOSITE_ITEM_DESC, HEADERS_COMPOSITE_ITEM_NAMES, HEADERS_TABULAR_UNIQUE_INDEX, QUEUE_NAMES, TABULAR_UNIQUE_INDEX, TYPE
 
Fields inherited from interface org.apache.qpid.server.management.ManagedObject
DOMAIN
 
Constructor Summary
AbstractExchangeMBean(T abstractExchange)
           
 
Method Summary
 void createNewBinding(String queueName, String binding)
           
 T getExchange()
           
 String getExchangeType()
           
protected  ManagedObjectRegistry getManagedObjectRegistry()
           
 String getName()
           
 String getObjectInstanceName()
           
 ObjectName getObjectName()
          Created the ObjectName as per the JMX Specs
 ManagedObject getParentObject()
           
 Integer getTicketNo()
           
protected  void init()
           
 boolean isAutoDelete()
           
 boolean isDurable()
           
 void removeBinding(String queueName, String binding)
          Removes a queue binding from the exchange.
 
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, 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
 
Methods inherited from interface org.apache.qpid.management.common.mbeans.ManagedExchange
bindings
 

Field Detail

_bindingItemTypes

protected OpenType[] _bindingItemTypes

_bindingDataType

protected CompositeType _bindingDataType

_bindinglistDataType

protected TabularType _bindinglistDataType
Constructor Detail

AbstractExchangeMBean

public AbstractExchangeMBean(T abstractExchange)
                      throws NotCompliantMBeanException
Throws:
NotCompliantMBeanException
Method Detail

init

protected void init()
             throws OpenDataException
Throws:
OpenDataException

getParentObject

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

getExchange

public T getExchange()

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.

getName

public String getName()
Specified by:
getName in interface org.apache.qpid.management.common.mbeans.ManagedExchange

getExchangeType

public String getExchangeType()
Specified by:
getExchangeType in interface org.apache.qpid.management.common.mbeans.ManagedExchange

getTicketNo

public Integer getTicketNo()
Specified by:
getTicketNo in interface org.apache.qpid.management.common.mbeans.ManagedExchange

isDurable

public boolean isDurable()
Specified by:
isDurable in interface org.apache.qpid.management.common.mbeans.ManagedExchange

isAutoDelete

public boolean isAutoDelete()
Specified by:
isAutoDelete in interface org.apache.qpid.management.common.mbeans.ManagedExchange

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

getManagedObjectRegistry

protected ManagedObjectRegistry getManagedObjectRegistry()
Overrides:
getManagedObjectRegistry in class DefaultManagedObject

createNewBinding

public void createNewBinding(String queueName,
                             String binding)
                      throws JMException
Specified by:
createNewBinding in interface org.apache.qpid.management.common.mbeans.ManagedExchange
Throws:
JMException

removeBinding

public void removeBinding(String queueName,
                          String binding)
                   throws JMException
Removes a queue binding from the exchange.

Specified by:
removeBinding in interface org.apache.qpid.management.common.mbeans.ManagedExchange
Throws:
JMException
See Also:
BindingFactory.removeBinding(String, AMQQueue, Exchange, Map)


Licensed to the Apache Software Foundation