public class AnnotatedStandardEmitterMBean extends StandardEmitterMBean
StandardEmitterMBean that uses the Description and Notification annotations to describe the MBean and any attributes, operations and notifications it declares.
The implementation of this class is basically identical to the AnnotatedStandardMBean class.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AnnotatedStandardEmitterMBean.SilentEmitter
A silent
NotificationEmitter implementation for all NotificationEmitter methods except getNotificationInfo(). |
| Constructor and Description |
|---|
AnnotatedStandardEmitterMBean(T impl, Class<T> clzIface)
Make a DynamicMBean out of the MBean implementation, using the specified mbeanInterface class.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getDescription(MBeanAttributeInfo info)
Retrieve a description for a particular attribute by finding a
Description annotation on the getter method for the attribute. |
protected String |
getDescription(MBeanInfo info)
Retrieve the description for the MBean from the MBean interface annotation.
|
protected String |
getDescription(MBeanOperationInfo info)
Retrieve a description for the particular
MBeanOperationInfo by finding a Description annotation on the corresponding operation. |
MBeanNotificationInfo[] |
getNotificationInfo() |
protected String |
getParameterName(MBeanOperationInfo op, MBeanParameterInfo param, int iParam)
Retrieve the parameter name for the specified parameter by finding a
Description annotation on the operation. |
addNotificationListener, removeNotificationListener, removeNotificationListener, sendNotificationcacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
public AnnotatedStandardEmitterMBean(T impl,
Class<T> clzIface)
throws NotCompliantMBeanException
T - the type of the MBean implementationimpl - the implementation of the MBeanclzIface - the Management Interface implemented by the MBean's implementation. If null, then this object will use standard JMX design pattern to determine the management interface associated with the given implementationNotCompliantMBeanException - if the mbeanInterface does not follow JMX design patterns for Management Interfaces, or if the provided implementation does not implement the specified interfaceprotected String getDescription(MBeanInfo info)
getDescription in class StandardMBeaninfo - the MBeanInfo for the MBeanprotected String getDescription(MBeanOperationInfo info)
MBeanOperationInfo by finding a Description annotation on the corresponding operation.getDescription in class StandardMBeaninfo - the MBeanOperationInfoprotected String getDescription(MBeanAttributeInfo info)
Description annotation on the getter method for the attribute. If a description is not found on the getter method, the setter will be checked.getDescription in class StandardMBeaninfo - the MBeanAttributeInfo for the attributeprotected String getParameterName(MBeanOperationInfo op, MBeanParameterInfo param, int iParam)
Description annotation on the operation.getParameterName in class StandardMBeanop - the MBeanOperationInfo for the opparam - the MBeanParameterInfo for the parameteriParam - zero-based sequence number of the parameterpublic MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface NotificationBroadcastergetNotificationInfo in class StandardEmitterMBean