Package org.apache.activemq.broker.jmx
Class AnnotatedMBean
- java.lang.Object
-
- javax.management.StandardMBean
-
- 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
Constructors Modifier Constructor Description protectedAnnotatedMBean(Class<?> mbeanInterface, ObjectName objectName)Instance where the MBean interface is implemented by this object.AnnotatedMBean(T impl, Class<T> mbeanInterface, ObjectName objectName)Instance where the MBean interface is implemented by another object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetDescription(MBeanAttributeInfo info)protected StringgetDescription(MBeanOperationInfo op)protected StringgetParameterName(MBeanOperationInfo op, MBeanParameterInfo param, int paramNo)Objectinvoke(String s, Object[] objects, String[] strings)static voidregisterMBean(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
-
-
-
-
Constructor Detail
-
AnnotatedMBean
public AnnotatedMBean(T impl, Class<T> mbeanInterface, ObjectName objectName) throws NotCompliantMBeanExceptionInstance where the MBean interface is implemented by another object.- Throws:
NotCompliantMBeanException
-
AnnotatedMBean
protected AnnotatedMBean(Class<?> mbeanInterface, ObjectName objectName) 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:
getDescriptionin classStandardMBean
-
getDescription
protected String getDescription(MBeanOperationInfo op)
- Overrides:
getDescriptionin classStandardMBean
-
getParameterName
protected String getParameterName(MBeanOperationInfo op, MBeanParameterInfo param, int paramNo)
- Overrides:
getParameterNamein classStandardMBean
-
invoke
public Object invoke(String s, Object[] objects, String[] strings) throws MBeanException, ReflectionException
- Specified by:
invokein interfaceDynamicMBean- Overrides:
invokein classStandardMBean- Throws:
MBeanExceptionReflectionException
-
-