patterntesting.runtime.jmx
Class AnnotatedStandardMBean

Package class diagram package AnnotatedStandardMBean
java.lang.Object
  extended by javax.management.StandardMBean
      extended by patterntesting.runtime.jmx.AnnotatedStandardMBean
All Implemented Interfaces:
DynamicMBean, MBeanRegistration

public class AnnotatedStandardMBean
extends 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
protected AnnotatedStandardMBean(Class<?> mbeanInterface)
          Instance where the MBean interface is implemented by this object.
  AnnotatedStandardMBean(T impl, Class<T> mbeanInterface)
          Instance where the MBean interface is implemented by another object.
 
Method Summary
protected  String getDescription(MBeanAttributeInfo info)
          Gets the description.
protected  String getDescription(MBeanOperationInfo op)
          Overrides the default description with the content 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedStandardMBean

public AnnotatedStandardMBean(T impl,
                              Class<T> mbeanInterface)
                       throws 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 interface
mbeanInterface - MBean interface
Throws:
NotCompliantMBeanException - thrown if MBean is not JMX compliant

AnnotatedStandardMBean

protected AnnotatedStandardMBean(Class<?> mbeanInterface)
                          throws NotCompliantMBeanException
Instance where the MBean interface is implemented by this object.

Parameters:
mbeanInterface - MBean interface
Throws:
NotCompliantMBeanException - thrown if MBean is not JMX compliant
Method Detail

getDescription

protected String getDescription(MBeanOperationInfo op)
Overrides the default description with the content a @Description annotation.

Overrides:
getDescription in class StandardMBean
Parameters:
op - the op
Returns:
the description
See Also:
Description

getDescription

protected String getDescription(MBeanAttributeInfo info)
Gets the description.

Overrides:
getDescription in class StandardMBean
Parameters:
info - the info
Returns:
the description
See Also:
StandardMBean.getDescription(javax.management.MBeanAttributeInfo)


Copyright © 2002–2014 PatternTesting Team. All rights reserved.