public class ObjectMBean extends Object implements DynamicMBean
Constructor and Description |
---|
ObjectMBean(Object managedObject) |
Modifier and Type | Method and Description |
---|---|
MBeanAttributeInfo |
defineAttribute(String name,
String metaData)
Define an attribute on the managed object.
|
Object |
getAttribute(String name) |
AttributeList |
getAttributes(String[] names) |
Object |
getManagedObject() |
MBeanContainer |
getMBeanContainer() |
MBeanInfo |
getMBeanInfo() |
String |
getObjectContextBasis() |
ObjectName |
getObjectName() |
String |
getObjectNameBasis() |
Object |
invoke(String name,
Object[] params,
String[] signature) |
static Object |
mbeanFor(Object o)
Create MBean for Object.
|
void |
setAttribute(Attribute attr) |
AttributeList |
setAttributes(AttributeList attrs) |
protected void |
setMBeanContainer(MBeanContainer container) |
protected Object _managed
public ObjectMBean(Object managedObject)
public static Object mbeanFor(Object o)
class com.acme.MyClass extends com.acme.util.BaseClass implements com.acme.IfaceThen this method would look for the following classes:
o
- The objectpublic Object getManagedObject()
public ObjectName getObjectName()
public String getObjectContextBasis()
public String getObjectNameBasis()
protected void setMBeanContainer(MBeanContainer container)
public MBeanContainer getMBeanContainer()
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute
in interface DynamicMBean
AttributeNotFoundException
MBeanException
ReflectionException
public AttributeList getAttributes(String[] names)
getAttributes
in interface DynamicMBean
public void setAttribute(Attribute attr) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface DynamicMBean
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
public AttributeList setAttributes(AttributeList attrs)
setAttributes
in interface DynamicMBean
public Object invoke(String name, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
MBeanException
ReflectionException
public MBeanAttributeInfo defineAttribute(String name, String metaData)
name
- metaData
- "description" or "access:description" or "type:access:description" where type is
one of: Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.