|
||||||||||
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
public class 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 java.lang.Class |
findClassForPrim(java.lang.String primName)
Deprecated. Get the class of the constructed type corresponding to the given primitive type |
static java.lang.reflect.Constructor |
findConstructor(java.lang.Class theClass,
java.lang.Class[] parameterTypes)
Deprecated. Finds a specific constructor of a class Returns the requested constructor or null if not found |
static java.lang.reflect.Method |
findGetter(java.lang.Class classObj,
java.lang.String attribute)
Deprecated. Finds the getter of a specific attribute in an object. |
static java.lang.reflect.Method |
findMethod(java.lang.Class classObj,
java.lang.String name)
Deprecated. Finds a specific method of an object without knowing the parameter types. |
static java.lang.reflect.Method |
findMethod(java.lang.Class classObj,
java.lang.String name,
java.lang.Class[] parameterTypes)
Deprecated. Finds a specific method of an object. |
static java.lang.reflect.Method |
findMethod(java.lang.Class classObj,
java.lang.String name,
int paramCount)
Deprecated. Finds a specific method of an object given the number of parameters. |
static java.lang.Class |
findPrimForClass(java.lang.Object value)
Deprecated. Get the class of the primitive type corresponding to the given constructed object. |
static java.lang.reflect.Method |
findSetter(java.lang.Class classObj,
java.lang.String attribute)
Deprecated. Finds the setter of a specific attribute without knowing its type. |
static java.lang.reflect.Method |
findSetter(java.lang.Class classObj,
java.lang.String attribute,
java.lang.Class type)
Deprecated. Finds the setter of a specific attribute in an object. |
java.lang.Object |
getAttribute(java.lang.Object instance,
java.lang.String attribute)
Deprecated. Gets the value of a specific attribute of an MBean. |
protected java.lang.Object |
getAttribute(java.lang.Object instance,
java.lang.String attribute,
java.lang.Class mbeanClass)
Deprecated. Invoke getAttribute through reflection on a standard MBean instance. |
javax.management.AttributeList |
getAttributes(java.lang.Object instance,
java.lang.String[] attributes)
Deprecated. Enables the values of several attributes of an MBean. |
java.lang.String |
getMBeanClassName(java.lang.Object moi)
Deprecated. This method returns the class name of an MBean. |
javax.management.MBeanInfo |
getMBeanInfo(java.lang.Object moi)
Deprecated. This method discovers the attributes and operations that an MBean exposes for management. |
javax.management.MBeanInfo |
getMBeanInfoFromClass(java.lang.Class beanClass)
Deprecated. This method discovers the attributes and operations that an MBean exposes for management. |
java.lang.Class |
getMBeanInterfaceFromClass(java.lang.Class c)
Deprecated. This methods returns the MBean interface of an MBean |
java.lang.Object |
invoke(java.lang.Object instance,
java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
Deprecated. Invokes an operation on an MBean. |
boolean |
isInstanceOf(java.lang.Object instance,
java.lang.String className)
Deprecated. Determine whether the given MBean is an instance of a given class/interface. |
java.lang.Object |
setAttribute(java.lang.Object instance,
javax.management.Attribute attribute)
Deprecated. Sets the value of a specific attribute of an MBean. |
protected java.lang.Object |
setAttribute(java.lang.Object instance,
javax.management.Attribute attribute,
java.lang.Class mbeanClass)
Deprecated. Invoke setAttribute through reflection on a standard MBean instance. |
javax.management.AttributeList |
setAttributes(java.lang.Object instance,
javax.management.AttributeList attributes)
Deprecated. Sets the values of several attributes of an MBean. |
void |
testCompliance(java.lang.Class c)
Deprecated. 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(java.lang.Class c) throws javax.management.NotCompliantMBeanException
testCompliance
in interface MetaData
testCompliance
in class DynamicMetaDataImpl
javax.management.NotCompliantMBeanException
public java.lang.Class getMBeanInterfaceFromClass(java.lang.Class c)
public javax.management.MBeanInfo getMBeanInfoFromClass(java.lang.Class beanClass) throws javax.management.IntrospectionException, javax.management.NotCompliantMBeanException
beanClass
- The class to be analyzed.
javax.management.IntrospectionException
- if an exception occurs during
introspection.
javax.management.NotCompliantMBeanException
- if the MBean class is not
MBean compliant.public static java.lang.reflect.Method findMethod(java.lang.Class classObj, java.lang.String name, java.lang.Class[] parameterTypes)
public static java.lang.reflect.Method findMethod(java.lang.Class classObj, java.lang.String name)
public static java.lang.reflect.Method findMethod(java.lang.Class classObj, java.lang.String name, int paramCount)
public static java.lang.reflect.Method findGetter(java.lang.Class classObj, java.lang.String attribute)
public static java.lang.reflect.Method findSetter(java.lang.Class classObj, java.lang.String attribute, java.lang.Class type)
public static java.lang.reflect.Method findSetter(java.lang.Class classObj, java.lang.String attribute)
public static java.lang.reflect.Constructor findConstructor(java.lang.Class theClass, java.lang.Class[] parameterTypes)
public static java.lang.Class findClassForPrim(java.lang.String primName)
public static java.lang.Class findPrimForClass(java.lang.Object value)
public java.lang.String getMBeanClassName(java.lang.Object moi) throws javax.management.IntrospectionException, javax.management.NotCompliantMBeanException
MetaData
getMBeanClassName
in interface MetaData
getMBeanClassName
in class DynamicMetaDataImpl
moi
- The MBean whose class is to be analyzed.
javax.management.IntrospectionException
- if an exception occurs during
introspection.
javax.management.NotCompliantMBeanException
public javax.management.MBeanInfo getMBeanInfo(java.lang.Object moi) throws javax.management.IntrospectionException
MetaData
getMBeanInfo
in interface MetaData
getMBeanInfo
in class DynamicMetaDataImpl
moi
- The MBean whose class is to be analyzed.
javax.management.IntrospectionException
- if an exception occurs during
introspection.public java.lang.Object getAttribute(java.lang.Object instance, java.lang.String attribute) throws javax.management.MBeanException, javax.management.AttributeNotFoundException, javax.management.ReflectionException
MetaData
getAttribute
in interface MetaData
getAttribute
in class DynamicMetaDataImpl
instance
- The MBean from which the attribute is to be retrieved.attribute
- An String specifying the name of the attribute to be
retrieved.
javax.management.MBeanException
- Wraps an exception thrown by the MBean's
getter.
javax.management.AttributeNotFoundException
- The specified attribute is
not accessible in the MBean.
javax.management.ReflectionException
- Wraps a java.lang.Exception thrown
while trying to invoke the getter.public javax.management.AttributeList getAttributes(java.lang.Object instance, java.lang.String[] attributes) throws javax.management.ReflectionException
MetaData
getAttributes
in interface MetaData
getAttributes
in class DynamicMetaDataImpl
instance
- The MBean from which the attributes are to be retrieved.attributes
- A list of the attributes to be retrieved.
javax.management.ReflectionException
- An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean.public javax.management.AttributeList setAttributes(java.lang.Object instance, javax.management.AttributeList attributes) throws javax.management.ReflectionException
MetaData
setAttributes
in interface MetaData
setAttributes
in class DynamicMetaDataImpl
instance
- The MBean within which the attributes are to be set.attributes
- A list of attributes: The identification of the
attributes to be set and the values they are to be set to.
javax.management.ReflectionException
- An exception occurred when trying to
invoke the getAttributes method of a Dynamic MBean.public java.lang.Object setAttribute(java.lang.Object instance, javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException
MetaData
setAttribute
in interface MetaData
setAttribute
in class DynamicMetaDataImpl
instance
- The MBean within which the attribute is to be set.attribute
- The identification of the attribute to be set and
the value it is to be set to.
javax.management.AttributeNotFoundException
- The specified attribute is
not accessible in the MBean.
javax.management.InvalidAttributeValueException
- The specified value for
the attribute is not valid.
javax.management.MBeanException
- Wraps an exception thrown by the MBean's
setter.
javax.management.ReflectionException
- Wraps a java.lang.Exception thrown
while trying to invoke the setter.public java.lang.Object invoke(java.lang.Object instance, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException, javax.management.ReflectionException
MetaData
invoke
in interface MetaData
invoke
in class DynamicMetaDataImpl
instance
- The MBean on which the method is to be invoked.operationName
- The name of the operation to be invoked.params
- An array containing the parameters to be set when the operation is
invokedsignature
- An array containing the signature of the operation. The class objects will
be loaded using the same class loader as the one used for loading the
MBean on which the operation was invoked.
javax.management.MBeanException
- Wraps an exception thrown by the MBean's invoked method.
javax.management.ReflectionException
- Wraps a java.lang.Exception thrown while trying to invoke the method.public boolean isInstanceOf(java.lang.Object instance, java.lang.String className) throws javax.management.ReflectionException
MetaData
isInstanceOf
in interface MetaData
isInstanceOf
in class DynamicMetaDataImpl
instance
- The MBean concerned.className
- The name of the class or interface.
true
if the MBean is an instance of the
given class
, false
otherwise.
javax.management.ReflectionException
- ifprotected java.lang.Object getAttribute(java.lang.Object instance, java.lang.String attribute, java.lang.Class mbeanClass) throws javax.management.MBeanException, javax.management.AttributeNotFoundException, javax.management.ReflectionException
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.ReflectionException
protected java.lang.Object setAttribute(java.lang.Object instance, javax.management.Attribute attribute, java.lang.Class mbeanClass) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
|
Open Source build 01-ea opendmk-1.0-b01-ea 2010.10.20_19:39:55_UTC |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |