org.objectweb.fractal.jmx.agent
Class Introspector

java.lang.Object
  extended byorg.objectweb.fractal.jmx.agent.Introspector

public class Introspector
extends Object

Uses introspection to build ModelMBeans.

Author:
Lucas McGregor, slightly modified for Fractal JMX

Method Summary
static RequiredModelMBean createMBean(Object obj)
          Uses introspection to create an MBean that can manage methods and attributes of an object.
static RequiredModelMBean createMBean(Object obj, Class assign)
          Uses introspection to create an MBean that can manage some methods and attributes of an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createMBean

public static RequiredModelMBean createMBean(Object obj)
                                      throws JMException
Uses introspection to create an MBean that can manage methods and attributes of an object.

Parameters:
obj - the object to introspect.
Returns:
a RequiredModelMBean that can manage the object.
Throws:
JMException - if a problem occurs during introspection.

createMBean

public static RequiredModelMBean createMBean(Object obj,
                                             Class assign)
                                      throws JMException,
                                             InvalidTargetObjectTypeException
Uses introspection to create an MBean that can manage some methods and attributes of an object. These methods and attributes are specified in a class assignable to the object class.

Parameters:
obj - the object to introspect.
assign - a class assignable to the object class.
Returns:
a RequiredModelMBean that can manage the object.
Throws:
InvalidTargetObjectTypeException - if assign is not assignable to the object class.
JMException - if a problem occurs during introspection.