org.apache.activemq.broker.jmx
Class AnnotatedMBean

java.lang.Object
  extended by javax.management.StandardMBean
      extended by org.apache.activemq.broker.jmx.AnnotatedMBean
All Implemented Interfaces:
DynamicMBean, MBeanRegistration
Direct Known Subclasses:
AsyncAnnotatedMBean

public class AnnotatedMBean
extends StandardMBean

MBean that looks for method/parameter descriptions in the Info annotation.


Constructor Summary
protected AnnotatedMBean(Class<?> mbeanInterface)
          Instance where the MBean interface is implemented by this object.
  AnnotatedMBean(T impl, Class<T> mbeanInterface)
          Instance where the MBean interface is implemented by another object.
 
Method Summary
protected  String getDescription(MBeanAttributeInfo info)
          
protected  String getDescription(MBeanOperationInfo op)
          
protected  String getParameterName(MBeanOperationInfo op, MBeanParameterInfo param, int paramNo)
          
 Object invoke(String s, Object[] objects, String[] strings)
           
static void registerMBean(ManagementContext context, Object object, ObjectName objectName)
           
 
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedMBean

public AnnotatedMBean(T impl,
                      Class<T> mbeanInterface)
               throws NotCompliantMBeanException
Instance where the MBean interface is implemented by another object.

Throws:
NotCompliantMBeanException

AnnotatedMBean

protected AnnotatedMBean(Class<?> mbeanInterface)
                  throws NotCompliantMBeanException
Instance where the MBean interface is implemented by this object.

Throws:
NotCompliantMBeanException
Method Detail

registerMBean

public static void registerMBean(ManagementContext context,
                                 Object object,
                                 ObjectName objectName)
                          throws Exception
Throws:
Exception

getDescription

protected String getDescription(MBeanAttributeInfo info)

Overrides:
getDescription in class StandardMBean

getDescription

protected String getDescription(MBeanOperationInfo op)

Overrides:
getDescription in class StandardMBean

getParameterName

protected String getParameterName(MBeanOperationInfo op,
                                  MBeanParameterInfo param,
                                  int paramNo)

Overrides:
getParameterName in class StandardMBean

invoke

public Object invoke(String s,
                     Object[] objects,
                     String[] strings)
              throws MBeanException,
                     ReflectionException
Specified by:
invoke in interface DynamicMBean
Overrides:
invoke in class StandardMBean
Throws:
MBeanException
ReflectionException


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.