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 protected
AnnotatedMBean(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 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
-
-
-
-
Constructor Detail
-
AnnotatedMBean
public AnnotatedMBean(T impl, Class<T> mbeanInterface, ObjectName objectName) throws NotCompliantMBeanException
Instance 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:
getDescription
in classStandardMBean
-
getDescription
protected String getDescription(MBeanOperationInfo op)
- Overrides:
getDescription
in classStandardMBean
-
getParameterName
protected String getParameterName(MBeanOperationInfo op, MBeanParameterInfo param, int paramNo)
- Overrides:
getParameterName
in classStandardMBean
-
invoke
public Object invoke(String s, Object[] objects, String[] strings) throws MBeanException, ReflectionException
- Specified by:
invoke
in interfaceDynamicMBean
- Overrides:
invoke
in classStandardMBean
- Throws:
MBeanException
ReflectionException
-
-