A dynamic MBean that can wrap an arbitrary Object instance.
The attributes and operations exposed by this bean are controlled by the merge of annotations discovered in all superclasses and all superinterfaces.
Given class com.acme.Foo, then com.acme.jmx.FooMBean
is searched; if found, it is instantiated with the com.acme.Foo
instance passed to the constructor.
Class com.acme.jmx.FooMBean can then override the default
behavior of ObjectMBean and provide a custom ObjectName, or custom
ObjectName properties name and context, etc.
| Modifier and Type | Field and Description |
|---|---|
| protected final Object | |
| private MBeanContainer | |
| private MetaData | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public | ObjectMBean(Object
the object to manage managedObject)Creates a new ObjectMBean wrapping the given |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object | |
| pack-priv ObjectName | |
| public Object | getAttribute(String
The name of the attribute to be retrieved name)Implements javax. |
| public AttributeList | getAttributes(String[]
A list of the attributes to be retrieved. names)Implements javax. |
| public Object | |
| public MBeanContainer | |
| public MBeanInfo | getMBeanInfo()
Implements javax. |
| public String | Returns: a custom value for the propertycontextAllows to customize the ObjectName property |
| public ObjectName | Returns: a custom ObjectName, or null to indicate toMBeanContainer to create a default ObjectNameAllows to customize the ObjectName of this MBean. |
| public String | Returns: a custom value for the propertynameAllows to customize the ObjectName property |
| public Object | invoke(String
The name of the action to be invoked. name, 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)Implements javax. |
| pack-priv MetaData | |
| public void | setAttribute(Attribute
The identification of the attribute to
be set and the value it is to be set to. attribute)Implements javax. |
| public AttributeList | setAttributes(AttributeList
A list of attributes: The identification of the
attributes to be set and the values they are to be set to. attributes)Implements javax. |
| protected void |
| _managed | back to summary |
|---|---|
| protected final Object _managed | |
| _mbeanContainer | back to summary |
|---|---|
| private MBeanContainer _mbeanContainer | |
| _metaData | back to summary |
|---|---|
| private MetaData _metaData | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| ObjectMBean | back to summary |
|---|---|
| public ObjectMBean(Object managedObject) Creates a new ObjectMBean wrapping the given
| |
| findBean | back to summary |
|---|---|
| pack-priv Object findBean(ObjectName objectName) | |
| findObjectName | back to summary |
|---|---|
| pack-priv ObjectName findObjectName(Object bean) | |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(String name) throws AttributeNotFoundException, ReflectionException, MBeanException Implements javax. Doc from javax. Obtain the value of a specific attribute of the Dynamic MBean.
| |
| getAttributes | back to summary |
|---|---|
| public AttributeList getAttributes(String[] names) Implements javax. Doc from javax. Get the values of several attributes of the Dynamic MBean.
| |
| getManagedObject | back to summary |
|---|---|
| public Object getManagedObject() Get the managed object.
| |
| getMBeanContainer | back to summary |
|---|---|
| public MBeanContainer getMBeanContainer() | |
| getMBeanInfo | back to summary |
|---|---|
| public MBeanInfo getMBeanInfo() Implements javax. Doc from javax. Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object. | |
| getObjectContextBasis | back to summary |
|---|---|
| public String getObjectContextBasis() Allows to customize the ObjectName property When For example, if object A has a child component B which has children components C, then AMBean can override this method to return "alpha", and then the ObjectNames will be:
| |
| getObjectName | back to summary |
|---|---|
| public ObjectName getObjectName() Allows to customize the ObjectName of this MBean.
| |
| getObjectNameBasis | back to summary |
|---|---|
| public String getObjectNameBasis() Allows to customize the ObjectName property Certain components have a natural name and returning it from this method allows it to be part of the ObjectName.
| |
| invoke | back to summary |
|---|---|
| public Object invoke(String name, Object[] params, String[] signature) throws ReflectionException, MBeanException Implements javax. Doc from javax. Allows an action to be invoked on the Dynamic MBean.
| |
| metaData | back to summary |
|---|---|
| pack-priv MetaData metaData() | |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(Attribute attribute) throws AttributeNotFoundException, ReflectionException, MBeanException Implements javax. Doc from javax. Set the value of a specific attribute of the Dynamic MBean.
| |
| setAttributes | back to summary |
|---|---|
| public AttributeList setAttributes(AttributeList attributes) Implements javax. Doc from javax. Sets the values of several attributes of the Dynamic MBean.
| |
| setMBeanContainer | back to summary |
|---|---|
| protected void setMBeanContainer(MBeanContainer container) | |