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 DynamicMBeanpublic Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute in interface DynamicMBeanAttributeNotFoundExceptionMBeanExceptionReflectionExceptionpublic AttributeList getAttributes(String[] names)
getAttributes in interface DynamicMBeanpublic void setAttribute(Attribute attr) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute in interface DynamicMBeanAttributeNotFoundExceptionInvalidAttributeValueExceptionMBeanExceptionReflectionExceptionpublic AttributeList setAttributes(AttributeList attrs)
setAttributes in interface DynamicMBeanpublic Object invoke(String name, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke in interface DynamicMBeanMBeanExceptionReflectionExceptionpublic 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.