org.jboss.mx.metadata
Class StandardMetaData

java.lang.Object
  extended byorg.jboss.mx.metadata.AbstractBuilder (src) 
      extended byorg.jboss.mx.metadata.StandardMetaData
All Implemented Interfaces:
MetaDataBuilder (src)

public class StandardMetaData
extends AbstractBuilder (src)

This metadata builder implementation builds a MBean info based on the naming rules of the Standard MBeans. The MBean server uses this builder to generate the metadata for Standard MBeans.

In cooperation with the MBeanInfoConversion class you can use this builder as a migration tool from Standard to Model MBeans, or for cases where you want the management interface be based on a compile-time type safe interface. It is also possible to subclass this builder implementation to extend it to support more sophisticated introspection rules such as adding descriptors to management interface elements.


Field Summary
 
Fields inherited from class org.jboss.mx.metadata.AbstractBuilder (src)
properties
 
Constructor Summary
StandardMetaData(java.lang.Class mbeanClass)
          Initializes the Standard metadata builder.
StandardMetaData(java.lang.Object mbeanInstance)
          Initializes the Standard metadata builder.
StandardMetaData(java.lang.Object mbInstance, java.lang.Class mbInterface)
          Initializes the Standard metadata builder.
 
Method Summary
 MBeanInfo (src) build()
          Constructs the Model MBean metadata.
static java.lang.Class findStandardInterface(java.lang.Class mbeanClass)
          Locates an interface for a class that matches the Standard MBean naming convention.
 java.lang.Class getMBeanInterface()
          Retrieve the management interface
protected  java.lang.String getSignatureString(java.lang.reflect.Method method)
           
 
Methods inherited from class org.jboss.mx.metadata.AbstractBuilder (src)
getBooleanProperty, getProperties, getProperty, getStringProperty, setProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardMetaData

public StandardMetaData(java.lang.Object mbeanInstance)
                 throws NotCompliantMBeanException (src) 
Initializes the Standard metadata builder. The JMX metadata is based on the class of the given resource instance.

Parameters:
mbeanInstance - MBean instance

StandardMetaData

public StandardMetaData(java.lang.Class mbeanClass)
                 throws NotCompliantMBeanException (src) 
Initializes the Standard metadata builder. The JMX metadata is based on the given class.

Parameters:
mbeanClass - resource class that implements an interface adhering to the Standard MBean naming conventions

StandardMetaData

public StandardMetaData(java.lang.Object mbInstance,
                        java.lang.Class mbInterface)
                 throws NotCompliantMBeanException (src) 
Initializes the Standard metadata builder. The JMX metadata is based on the passed mbean interface.

Parameters:
mbInstance - MBean instance
mbInterface - the management interface
Method Detail

findStandardInterface

public static java.lang.Class findStandardInterface(java.lang.Class mbeanClass)
Locates an interface for a class that matches the Standard MBean naming convention.

Parameters:
mbeanClass - the class to investigate
Returns:
the Standard MBean interface class or null if not found

getMBeanInterface

public java.lang.Class getMBeanInterface()
Retrieve the management interface


build

public MBeanInfo (src)  build()
                throws NotCompliantMBeanException (src) 
Description copied from interface: MetaDataBuilder (src)
Constructs the Model MBean metadata.

Specified by:
build in interface MetaDataBuilder (src)
Specified by:
build in class AbstractBuilder (src)
Throws:
NotCompliantMBeanException (src)

getSignatureString

protected java.lang.String getSignatureString(java.lang.reflect.Method method)