org.jmx4odp.dynamicManagement
Class ObjectIntrospector

java.lang.Object
  extended by org.jmx4odp.dynamicManagement.ObjectIntrospector

public class ObjectIntrospector
extends java.lang.Object

Uses Introspection to build an ModelMBean to manage an object.

Author:
Lucas McGregor

Field Summary
static int JMX_1_1
           
static int JMX_1_2
           
static int JMX_CURRENT
          The most current supported JMX standard (currently, 1.2)
 
Constructor Summary
ObjectIntrospector()
          Creates a new instance of ObjectManagerFactory
 
Method Summary
 javax.management.modelmbean.RequiredModelMBean createMBean(java.lang.Object obj)
          This is the equivalent of calling createMBean(object, ObjectIntrospector.JMX_CURRENT)
 javax.management.modelmbean.RequiredModelMBean createMBean(java.lang.Object obj, int version)
          Will use introspection to determine the methods and attributes of the object and return an RequiredModelMBean that can manage the object.

JMX 1.1 and 1.2 use different ModelMBean setups.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JMX_1_1

public static final int JMX_1_1
See Also:
Constant Field Values

JMX_1_2

public static final int JMX_1_2
See Also:
Constant Field Values

JMX_CURRENT

public static final int JMX_CURRENT
The most current supported JMX standard (currently, 1.2)

See Also:
Constant Field Values
Constructor Detail

ObjectIntrospector

public ObjectIntrospector()
Creates a new instance of ObjectManagerFactory

Method Detail

createMBean

public javax.management.modelmbean.RequiredModelMBean createMBean(java.lang.Object obj)
                                                           throws javax.management.MBeanException,
                                                                  javax.management.InstanceNotFoundException,
                                                                  javax.management.modelmbean.InvalidTargetObjectTypeException
This is the equivalent of calling createMBean(object, ObjectIntrospector.JMX_CURRENT)

Throws:
javax.management.MBeanException
javax.management.InstanceNotFoundException
javax.management.modelmbean.InvalidTargetObjectTypeException

createMBean

public javax.management.modelmbean.RequiredModelMBean createMBean(java.lang.Object obj,
                                                                  int version)
                                                           throws javax.management.MBeanException,
                                                                  javax.management.InstanceNotFoundException,
                                                                  javax.management.modelmbean.InvalidTargetObjectTypeException
Will use introspection to determine the methods and attributes of the object and return an RequiredModelMBean that can manage the object.

JMX 1.1 and 1.2 use different ModelMBean setups. This class will by default return a ModelMBean for JMX1.2 (JMX_CURRENT), but can also return 1.1 complient MBeans. It should be noted that these are not compatable.

Parameters:
obj, - the object to wrap in a model MBean
version, - the JMX version that you want to support
Throws:
javax.management.MBeanException
javax.management.InstanceNotFoundException
javax.management.modelmbean.InvalidTargetObjectTypeException