javax.management
public interface DynamicMBean
DynamicMBean
may retrieve information about its attributes at
runtime and use this information to dynamically
obtain the corresponding values of these attributes.Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String name)
Obtains the value of the specified attribute of the
management bean.
|
AttributeList |
getAttributes(String[] names)
Obtains the values of each of the specified attributes
of the management bean.
|
MBeanInfo |
getMBeanInfo()
Returns an information object which lists the attributes
and actions associated with the management bean.
|
Object |
invoke(String name,
Object[] params,
String[] signature)
Invokes the specified action on the management bean using
the supplied parameters.
|
void |
setAttribute(Attribute attribute)
Sets the value of the specified attribute of the
management bean.
|
AttributeList |
setAttributes(AttributeList attributes)
Sets the value of each of the specified attributes
to that supplied by the
Attribute object. |
Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException
name
- the name of the attribute to retrieve.AttributeNotFoundException
- if the name does not
correspond to an attribute
of the bean.MBeanException
- if retrieving the attribute causes
the bean to throw an exception (which
becomes the cause of this exception).ReflectionException
- if an exception occurred in trying
to use the reflection interface
to lookup the attribute. The
thrown exception is the cause of
this exception.#setAttribute(String)
AttributeList getAttributes(String[] names)
names
- the names of the attributes to retrieve.setAttributes(AttributeList)
MBeanInfo getMBeanInfo()
Object invoke(String name, Object[] params, String[] signature) throws MBeanException, ReflectionException
String
array, which lists the classes
corresponding to each parameter. The class loader used to
load these classes is the same as that used for loading the
management bean itself.name
- the name of the action to invoke.params
- the parameters used to call the action.signature
- the signature of the action.MBeanException
- if the action throws an exception. The
thrown exception is the cause of this
exception.ReflectionException
- if an exception occurred in trying
to use the reflection interface
to invoke the action. The
thrown exception is the cause of
this exception.void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
attribute
- the attribute to set.AttributeNotFoundException
- if the attribute does not
correspond to an attribute
of the bean.InvalidAttributeValueException
- if the value is invalid
for this particular
attribute of the bean.MBeanException
- if setting the attribute causes
the bean to throw an exception (which
becomes the cause of this exception).ReflectionException
- if an exception occurred in trying
to use the reflection interface
to lookup the attribute. The
thrown exception is the cause of
this exception.getAttribute(String)
AttributeList setAttributes(AttributeList attributes)
Attribute
object.
The returned list contains the attributes that were
set and their new values.attributes
- the attributes to set.#getAttributes(AttributeList)