Top Description Methods
javax.management

public Interface DynamicMBean

Known Direct Subinterfaces
javax.management.modelmbean.ModelMBean, com.sun.jmx.mbeanserver.DynamicMBean2
Known Direct Implementers
javax.management.StandardMBean, com.sun.jmx.mbeanserver.MBeanServerDelegateImpl

Defines the methods that should be implemented by a Dynamic MBean (MBean that exposes a dynamic management interface).
Since
1.5

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

The value of the attribute retrieved.
getAttribute
(String
The name of the attribute to be retrieved
attribute
)

Obtain the value of a specific attribute of the Dynamic MBean.

public AttributeList

Returns:

The list of attributes retrieved.
getAttributes
(String[]
A list of the attributes to be retrieved.
attributes
)

Get the values of several attributes of the Dynamic MBean.

public MBeanInfo

Returns:

An instance of MBeanInfo allowing all attributes and actions exposed by this Dynamic MBean to be retrieved.
getMBeanInfo
()

Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object.

public Object

Returns:

The object returned by the action, which represents the result of invoking the action on the MBean specified.
invoke
(String
The name of the action to be invoked.
actionName
,
Object[]
An array containing the parameters to be set when the action is invoked.
params
,
String[]
An array containing the signature of the action. The class objects will be loaded through the same class loader as the one used for loading the MBean on which the action is invoked.
signature
)

Allows an action to be invoked on the Dynamic MBean.

public void
setAttribute(Attribute
The identification of the attribute to be set and the value it is to be set to.
attribute
)

Set the value of a specific attribute of the Dynamic MBean.

public AttributeList

Returns:

The list of attributes that were set, with their new values.
setAttributes
(AttributeList
A list of attributes: The identification of the attributes to be set and the values they are to be set to.
attributes
)

Sets the values of several attributes of the Dynamic MBean.

Method Detail

getAttributeback to summary
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException

Obtain the value of a specific attribute of the Dynamic MBean.

Parameters
attribute:String

The name of the attribute to be retrieved

Returns:Object

The value of the attribute retrieved.

Exceptions
AttributeNotFoundException:
if specified attribute does not exist or cannot be retrieved
MBeanException:
Wraps a java.lang.Exception thrown by the MBean's getter.
ReflectionException:
Wraps a java.lang.Exception thrown while trying to invoke the getter.
See Also
setAttribute
getAttributesback to summary
public AttributeList getAttributes(String[] attributes)

Get the values of several attributes of the Dynamic MBean.

Parameters
attributes:String[]

A list of the attributes to be retrieved.

Returns:AttributeList

The list of attributes retrieved.

See Also
setAttributes
getMBeanInfoback to summary
public MBeanInfo getMBeanInfo()

Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object.

Returns:MBeanInfo

An instance of MBeanInfo allowing all attributes and actions exposed by this Dynamic MBean to be retrieved.

invokeback to summary
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException

Allows an action to be invoked on the Dynamic MBean.

Parameters
actionName:String

The name of the action to be invoked.

params:Object[]

An array containing the parameters to be set when the action is invoked.

signature:String[]

An array containing the signature of the action. The class objects will be loaded through the same class loader as the one used for loading the MBean on which the action is invoked.

Returns:Object

The object returned by the action, which represents the result of invoking the action on the MBean specified.

Exceptions
MBeanException:
Wraps a java.lang.Exception thrown by the MBean's invoked method.
ReflectionException:
Wraps a java.lang.Exception thrown while trying to invoke the method
setAttributeback to summary
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException

Set the value of a specific attribute of the Dynamic MBean.

Parameters
attribute:Attribute

The identification of the attribute to be set and the value it is to be set to.

Exceptions
AttributeNotFoundException:
if specified attribute does not exist or cannot be retrieved
InvalidAttributeValueException:
if value specified is not valid for the attribute
MBeanException:
Wraps a java.lang.Exception thrown by the MBean's setter.
ReflectionException:
Wraps a java.lang.Exception thrown while trying to invoke the MBean's setter.
See Also
getAttribute
setAttributesback to summary
public AttributeList setAttributes(AttributeList attributes)

Sets the values of several attributes of the Dynamic MBean.

Parameters
attributes:AttributeList

A list of attributes: The identification of the attributes to be set and the values they are to be set to.

Returns:AttributeList

The list of attributes that were set, with their new values.

See Also
getAttributes