public class AnnotatedStandardMXBean
extends javax.management.StandardMBean
StandardMBean falls short with providing meaningful
descriptions and parameter names. This class reads those things from
Description and Name annotations of the MBean
interface class and methods.
Usage:
mbeanServer.registerMBean(new AnnotatedStandardMXBean(mbeanImpl, SomeMBean.class), name);| Constructor and Description |
|---|
AnnotatedStandardMXBean(T implementation,
java.lang.Class<T> mbeanInterface) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getDescription(javax.management.MBeanAttributeInfo info)
Returns the description of an Attribute
|
protected java.lang.String |
getDescription(javax.management.MBeanInfo beanInfo) |
protected java.lang.String |
getDescription(javax.management.MBeanOperationInfo op)
Returns the description of an operation
|
protected java.lang.String |
getDescription(javax.management.MBeanOperationInfo op,
javax.management.MBeanParameterInfo param,
int paramNo)
Returns the description of a parameter
|
protected java.lang.String |
getParameterName(javax.management.MBeanOperationInfo op,
javax.management.MBeanParameterInfo param,
int paramNo)
Returns the name of a parameter
|
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementationpublic AnnotatedStandardMXBean(T implementation,
java.lang.Class<T> mbeanInterface)
throws javax.management.NotCompliantMBeanException
implementation - the MBean implementationmbeanInterface - the MBean interface that is annotated with
Description and Name.javax.management.NotCompliantMBeanExceptionprotected java.lang.String getDescription(javax.management.MBeanInfo beanInfo)
getDescription in class javax.management.StandardMBeanprotected java.lang.String getDescription(javax.management.MBeanAttributeInfo info)
getDescription in class javax.management.StandardMBeanprotected java.lang.String getDescription(javax.management.MBeanOperationInfo op)
getDescription in class javax.management.StandardMBeanprotected java.lang.String getDescription(javax.management.MBeanOperationInfo op,
javax.management.MBeanParameterInfo param,
int paramNo)
getDescription in class javax.management.StandardMBeanprotected java.lang.String getParameterName(javax.management.MBeanOperationInfo op,
javax.management.MBeanParameterInfo param,
int paramNo)
getParameterName in class javax.management.StandardMBean