|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jdmk.DynamicMetaDataImpl
com.sun.jdmk.MetaDataImpl
The MetaData class provides local access to the metadata service in an agent.
Field Summary |
Fields inherited from class com.sun.jdmk.DynamicMetaDataImpl |
instantiator |
Method Summary | |
static Class |
findClassForPrim(String primName)
Get the class of the constructed type corresponding to the given primitive type |
static Constructor |
findConstructor(Class theClass,
Class[] parameterTypes)
Finds a specific constructor of a class Returns the requested constructor or null if not found |
static Method |
findGetter(Class classObj,
String attribute)
Finds the getter of a specific attribute in an object. |
static Method |
findMethod(Class classObj,
String name)
Finds a specific method of an object without knowing the parameter types. |
static Method |
findMethod(Class classObj,
String name,
Class[] parameterTypes)
Finds a specific method of an object. |
static Method |
findMethod(Class classObj,
String name,
int paramCount)
Finds a specific method of an object given the number of parameters. |
static Class |
findPrimForClass(Object value)
Get the class of the primitive type corresponding to the given constructed object. |
static Method |
findSetter(Class classObj,
String attribute)
Finds the setter of a specific attribute without knowing its type. |
static Method |
findSetter(Class classObj,
String attribute,
Class type)
Finds the setter of a specific attribute in an object. |
Object |
getAttribute(Object instance,
String attribute)
Gets the value of a specific attribute of an MBean. |
protected Object |
getAttribute(Object instance,
String attribute,
Class mbeanClass)
Invoke getAttribute through reflection on a standard MBean instance. |
AttributeList |
getAttributes(Object instance,
String[] attributes)
Enables the values of several attributes of an MBean. |
String |
getMBeanClassName(Object moi)
This method returns the class name of an MBean. |
MBeanInfo |
getMBeanInfo(Object moi)
This method discovers the attributes and operations that an MBean exposes for management. |
MBeanInfo |
getMBeanInfoFromClass(Class beanClass)
This method discovers the attributes and operations that an MBean exposes for management. |
Class |
getMBeanInterfaceFromClass(Class c)
This methods returns the MBean interface of an MBean |
Object |
invoke(Object instance,
String operationName,
Object[] params,
String[] signature)
Invokes an operation on an MBean. |
boolean |
isInstanceOf(Object instance,
String className)
Determine whether the given MBean is an instance of a given class/interface. |
Object |
setAttribute(Object instance,
Attribute attribute)
Sets the value of a specific attribute of an MBean. |
protected Object |
setAttribute(Object instance,
Attribute attribute,
Class mbeanClass)
Invoke setAttribute through reflection on a standard MBean instance. |
AttributeList |
setAttributes(Object instance,
AttributeList attributes)
Sets the values of several attributes of an MBean. |
void |
testCompliance(Class c)
This methods tests if the MBean is JMX compliant |
Methods inherited from class com.sun.jdmk.DynamicMetaDataImpl |
postDeregisterInvoker, postRegisterInvoker, preDeregisterInvoker, preRegisterInvoker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void testCompliance(Class c) throws NotCompliantMBeanException
testCompliance
in interface MetaData
testCompliance
in class DynamicMetaDataImpl
NotCompliantMBeanException
public Class getMBeanInterfaceFromClass(Class c)
public MBeanInfo getMBeanInfoFromClass(Class beanClass) throws IntrospectionException, NotCompliantMBeanException
beanClass
- The class to be analyzed.
IntrospectionException
- if an exception occurs during
introspection.
NotCompliantMBeanException
- if the MBean class is not
MBean compliant.public static Method findMethod(Class classObj, String name, Class[] parameterTypes)
public static Method findMethod(Class classObj, String name)
public static Method findMethod(Class classObj, String name, int paramCount)
public static Method findGetter(Class classObj, String attribute)
public static Method findSetter(Class classObj, String attribute, Class type)
public static Method findSetter(Class classObj, String attribute)
public static Constructor findConstructor(Class theClass, Class[] parameterTypes)
public static Class findClassForPrim(String primName)
public static Class findPrimForClass(Object value)
public String getMBeanClassName(Object moi) throws IntrospectionException, NotCompliantMBeanException
MetaData
getMBeanClassName
in interface MetaData
getMBeanClassName
in class DynamicMetaDataImpl
IntrospectionException
NotCompliantMBeanException
public MBeanInfo getMBeanInfo(Object moi) throws IntrospectionException
MetaData
getMBeanInfo
in interface MetaData
getMBeanInfo
in class DynamicMetaDataImpl
IntrospectionException
public Object getAttribute(Object instance, String attribute) throws MBeanException, AttributeNotFoundException, ReflectionException
MetaData
getAttribute
in interface MetaData
getAttribute
in class DynamicMetaDataImpl
MBeanException
AttributeNotFoundException
ReflectionException
public AttributeList getAttributes(Object instance, String[] attributes) throws ReflectionException
MetaData
getAttributes
in interface MetaData
getAttributes
in class DynamicMetaDataImpl
ReflectionException
public AttributeList setAttributes(Object instance, AttributeList attributes) throws ReflectionException
MetaData
setAttributes
in interface MetaData
setAttributes
in class DynamicMetaDataImpl
ReflectionException
public Object setAttribute(Object instance, Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
MetaData
setAttribute
in interface MetaData
setAttribute
in class DynamicMetaDataImpl
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
public Object invoke(Object instance, String operationName, Object[] params, String[] signature) throws MBeanException, ReflectionException
MetaData
invoke
in interface MetaData
invoke
in class DynamicMetaDataImpl
MBeanException
ReflectionException
public boolean isInstanceOf(Object instance, String className) throws ReflectionException
MetaData
isInstanceOf
in interface MetaData
isInstanceOf
in class DynamicMetaDataImpl
ReflectionException
protected Object getAttribute(Object instance, String attribute, Class mbeanClass) throws MBeanException, AttributeNotFoundException, ReflectionException
MBeanException
AttributeNotFoundException
ReflectionException
protected Object setAttribute(Object instance, Attribute attribute, Class mbeanClass) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
|
FCS Release jdmk-5_1-b34.2 2005.11.29_16:24:00_MET |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |