public class ObjectMBean extends Object implements DynamicMBean
Constructor and Description |
---|
ObjectMBean(Object managedObject) |
Modifier and Type | Method and Description |
---|---|
MBeanAttributeInfo |
defineAttribute(Method method,
ManagedAttribute attributeAnnotation)
TODO update to new behavior
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) |
protected boolean |
isAnnotationPresent(Class<?> clazz,
Class<? extends Annotation> annotation) |
static Object |
mbeanFor(Object o)
Create MBean for Object.
|
void |
setAttribute(Attribute attr) |
AttributeList |
setAttributes(AttributeList attrs) |
protected void |
setMBeanContainer(MBeanContainer container) |
protected String |
toVariableName(String methodName) |
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(Method method, ManagedAttribute attributeAnnotation)
method
- attributeAnnotation
- "description" or "access:description" or "type:access:description" where type is
one of: protected boolean isAnnotationPresent(Class<?> clazz, Class<? extends Annotation> annotation)
Copyright © 1995-2015 Webtide. All Rights Reserved.