FileDocCategorySizeDatePackage
MetaData.javaAPI DocJava SE 5 API7013Fri Aug 26 14:54:58 BST 2005com.sun.jmx.mbeanserver

MetaData

public interface MetaData
The MetaData interface provides local to the metadata service in an agent.
since
1.5
since.unbundled
JMX RI 1.2

Fields Summary
Constructors Summary
Methods Summary
public java.lang.ObjectgetAttribute(java.lang.Object instance, java.lang.String attribute)
Gets the value of a specific attribute of an MBean.

param
instance The MBean from which the attribute is to be retrieved.
param
attribute An String specifying the name of the attribute to be retrieved.
return
The value of the retrieved attribute.
exception
AttributeNotFoundException The specified attribute is not accessible in the MBean.
exception
MBeanException Wraps an exception thrown by the MBean's getter.
exception
ReflectionException Wraps a java.lang.Exception thrown while trying to invoke the getter.

public javax.management.AttributeListgetAttributes(java.lang.Object instance, java.lang.String[] attributes)
Enables the values of several attributes of an MBean.

param
instance The MBean from which the attributes are to be retrieved.
param
attributes A list of the attributes to be retrieved.
return
The list of the retrieved attributes.
exception
ReflectionException An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean.

public java.lang.StringgetMBeanClassName(java.lang.Object instance)
This method returns the class name of an MBean.

param
instance The MBean whose class is to be analyzed.
return
The class name of the MBean, as registered in its MBeanInfo.
exception
IntrospectionException if an exception occurs during introspection.

public javax.management.MBeanInfogetMBeanInfo(java.lang.Object instance)
This method discovers the attributes and operations that an MBean exposes for management.

param
instance The MBean whose class is to be analyzed.
return
An instance of MBeanInfo allowing to retrieve all methods and operations of this MBean.
exception
IntrospectionException if an exception occurs during introspection.

public java.lang.Objectinvoke(java.lang.Object instance, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
Invokes an operation on an MBean.

param
instance The MBean on which the method is to be invoked.
param
operationName The name of the operation to be invoked.
param
params An array containing the parameters to be set when the operation is invoked
param
signature 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.
return
The object returned by the operation, which represents the result of invoking the operation on the MBean specified.
exception
MBeanException Wraps an exception thrown by the MBean's invoked method.
exception
ReflectionException Wraps a java.lang.Exception thrown while trying to invoke the method.

public booleanisInstanceOf(java.lang.Object instance, java.lang.String className)
Determine whether the given MBean is an instance of a given class/interface.

param
instance The MBean concerned.
param
className The name of the class or interface.
return
true if the MBean is an instance of the given class, false otherwise.
exception
ReflectionException if

public voidpostDeregisterInvoker(java.lang.Object moi)
Invokes the postDeregister method of an MBean that implements MBeanRegistration

public voidpostRegisterInvoker(java.lang.Object moi, boolean registrationDone)
Invokes the postRegister method of an MBean that implements MBeanRegistration

public voidpreDeregisterInvoker(java.lang.Object moi)
Invokes the preDeregister method of an MBean that implements MBeanRegistration

public javax.management.ObjectNamepreRegisterInvoker(java.lang.Object moi, javax.management.ObjectName name, javax.management.MBeanServer mbs)
Invokes the preRegister method of an MBean that implements MBeanRegistration

public java.lang.ObjectsetAttribute(java.lang.Object instance, javax.management.Attribute attribute)
Sets the value of a specific attribute of an MBean.

param
instance The MBean within which the attribute is to be set.
param
attribute The identification of the attribute to be set and the value it is to be set to.
return
The value of the attribute that has been set.
exception
AttributeNotFoundException The specified attribute is not accessible in the MBean.
exception
InvalidAttributeValueException The specified value for the attribute is not valid.
exception
MBeanException Wraps an exception thrown by the MBean's setter.
exception
ReflectionException Wraps a java.lang.Exception thrown while trying to invoke the setter.

public javax.management.AttributeListsetAttributes(java.lang.Object instance, javax.management.AttributeList attributes)
Sets the values of several attributes of an MBean.

param
instance The MBean within which the attributes are to be set.
param
attributes A list of attributes: The identification of the attributes to be set and the values they are to be set to.
return
The list of attributes that were set, with their new values.
exception
ReflectionException An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean.

public voidtestCompliance(java.lang.Class c)
This methods tests if the MBean is JMX compliant