Package patterntesting.runtime.jmx
Class AnnotatedStandardMBean
- java.lang.Object
-
- javax.management.StandardMBean
-
- patterntesting.runtime.jmx.AnnotatedStandardMBean
-
- All Implemented Interfaces:
javax.management.DynamicMBean
,javax.management.MBeanRegistration
public class AnnotatedStandardMBean extends javax.management.StandardMBean
The Class AnnotatedStandardMBean.- Author:
- ninthbit StandardMBeans have meaningless default values with can be overcome subclassing and annotations. This classed is based on the article http://weblogs.java.net/blog/emcmanus/archive/2005/07/adding_informat.html
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AnnotatedStandardMBean(java.lang.Class<?> mbeanInterface)
Instance where the MBean interface is implemented by this object.AnnotatedStandardMBean(T impl, java.lang.Class<T> mbeanInterface)
Instance where the MBean interface is implemented by another object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getDescription(javax.management.MBeanAttributeInfo info)
Gets the description.protected java.lang.String
getDescription(javax.management.MBeanOperationInfo op)
Overrides the default description with the content of a @Description annotation.-
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
-
-
-
-
Constructor Detail
-
AnnotatedStandardMBean
public AnnotatedStandardMBean(T impl, java.lang.Class<T> mbeanInterface) throws javax.management.NotCompliantMBeanException
Instance where the MBean interface is implemented by another object.- Type Parameters:
T
- not necessary but occasionally avoids compiler warnings about generics- Parameters:
impl
- Class which implements an MBean interfacembeanInterface
- MBean interface- Throws:
javax.management.NotCompliantMBeanException
- thrown if MBean is not JMX compliant
-
AnnotatedStandardMBean
protected AnnotatedStandardMBean(java.lang.Class<?> mbeanInterface) throws javax.management.NotCompliantMBeanException
Instance where the MBean interface is implemented by this object.- Parameters:
mbeanInterface
- MBean interface- Throws:
javax.management.NotCompliantMBeanException
- thrown if MBean is not JMX compliant
-
-
Method Detail
-
getDescription
protected java.lang.String getDescription(javax.management.MBeanOperationInfo op)
Overrides the default description with the content of a @Description annotation.- Overrides:
getDescription
in classjavax.management.StandardMBean
- Parameters:
op
- the op- Returns:
- the description
- See Also:
Description
-
getDescription
protected java.lang.String getDescription(javax.management.MBeanAttributeInfo info)
Gets the description.- Overrides:
getDescription
in classjavax.management.StandardMBean
- Parameters:
info
- the info- Returns:
- the description
- See Also:
StandardMBean.getDescription(javax.management.MBeanAttributeInfo)
-
-