|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.container.jmx.AbstractDynamicMBean
public abstract class AbstractDynamicMBean
| Constructor Summary | |
|---|---|
protected |
AbstractDynamicMBean()
Only subclasses can create a new instance of an AbstractDynamicMBean. |
| Method Summary | |
|---|---|
protected MBeanAttributeInfo[] |
createMBeanAttributeInfo()
To be overridden to return metadata information about manageable attributes. |
protected MBeanConstructorInfo[] |
createMBeanConstructorInfo()
To be overridden to return metadata information about manageable constructors. |
protected MBeanInfo |
createMBeanInfo()
Creates the MBeanInfo for this instance, calling in succession factory methods that the user can override. |
protected MBeanNotificationInfo[] |
createMBeanNotificationInfo()
To be overridden to return metadata information about manageable notifications. |
protected MBeanOperationInfo[] |
createMBeanOperationInfo()
To be overridden to return metadata information about manageable operations. |
protected Method |
findMethod(Class cls,
String name,
Class[] params)
Returns the (public) method with the given name and signature on the given class. |
Object |
getAttribute(String attribute)
Returns the value of the manageable attribute, as specified by the DynamicMBean interface. |
AttributeList |
getAttributes(String[] attributes)
Returns the manageable attributes, as specified by the DynamicMBean interface. |
protected String |
getMBeanClassName()
To be overridden to return metadata information about the class name of this MBean; by default returns this class' name. |
protected String |
getMBeanDescription()
To be overridden to return metadata information about the description of this MBean. |
MBeanInfo |
getMBeanInfo()
Returns the MBeaInfo, as specified by the DynamicMBean interface; the default implementation caches the value returned by createMBeanInfo() (that is thus called only once). |
protected Object |
getResource()
Returns the resource object on which invoke attribute's getters, attribute's setters and operation's methods |
protected Object |
invoke(Object resource,
String name,
Class[] params,
Object[] args)
Looks up the method to call on given resource and invokes it. |
protected Object |
invoke(String name,
Class[] params,
Object[] args)
Deprecated. Replaced by invoke(Object,String,Class[],Object[]). The resource passed is the resource as set by setResource(java.lang.Object) or - if it is null - 'this' instance. This method is deprecated because it is not thread safe. |
Object |
invoke(String method,
Object[] arguments,
String[] params)
Returns the value of the manageable operation as specified by the DynamicMBean interface |
protected Object |
invokeMethod(Method method,
Object resource,
Object[] args)
Invokes the given method on the given resource object with the given arguments. |
void |
setAttribute(Attribute attribute)
Sets the value of the manageable attribute, as specified by the DynamicMBean interface. |
AttributeList |
setAttributes(AttributeList attributes)
Sets the manageable attributes, as specified by the DynamicMBean interface. |
protected void |
setMBeanInfo(MBeanInfo info)
Sets the MBeanInfo object cached by this instance. |
void |
setResource(Object resource)
Specifies the resource object on which invoke attribute's getters, attribute's setters and operation's methods. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractDynamicMBean()
createMBeanConstructorInfo()| Method Detail |
|---|
public Object getAttribute(String attribute)
throws AttributeNotFoundException,
MBeanException,
ReflectionException
getAttribute in interface DynamicMBeanAttributeNotFoundException
MBeanException
ReflectionExceptioncreateMBeanAttributeInfo()public AttributeList getAttributes(String[] attributes)
getAttributes in interface DynamicMBeanpublic MBeanInfo getMBeanInfo()
createMBeanInfo() (that is thus called only once).
getMBeanInfo in interface DynamicMBeancreateMBeanInfo(),
setMBeanInfo(javax.management.MBeanInfo)
public Object invoke(String method,
Object[] arguments,
String[] params)
throws MBeanException,
ReflectionException
invoke in interface DynamicMBeanMBeanException
ReflectionExceptioncreateMBeanOperationInfo()
public void setAttribute(Attribute attribute)
throws AttributeNotFoundException,
InvalidAttributeValueException,
MBeanException,
ReflectionException
setAttribute in interface DynamicMBeanAttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionExceptioncreateMBeanAttributeInfo()public AttributeList setAttributes(AttributeList attributes)
setAttributes in interface DynamicMBean
protected Object invoke(String name,
Class[] params,
Object[] args)
throws InvalidAttributeValueException,
MBeanException,
ReflectionException
invoke(Object,String,Class[],Object[]). setResource(java.lang.Object) or - if it is null - 'this' instance.
InvalidAttributeValueException
MBeanException
ReflectionException
protected Object invoke(Object resource,
String name,
Class[] params,
Object[] args)
throws InvalidAttributeValueException,
MBeanException,
ReflectionException
InvalidAttributeValueException
MBeanException
ReflectionExceptionfindMethod(java.lang.Class, java.lang.String, java.lang.Class[]),
invokeMethod(java.lang.reflect.Method, java.lang.Object, java.lang.Object[])
protected Method findMethod(Class cls,
String name,
Class[] params)
throws NoSuchMethodException
NoSuchMethodExceptioninvoke(String, Class[], Object[]),
invokeMethod(java.lang.reflect.Method, java.lang.Object, java.lang.Object[])
protected Object invokeMethod(Method method,
Object resource,
Object[] args)
throws IllegalAccessException,
IllegalArgumentException,
InvocationTargetException
IllegalAccessException
IllegalArgumentException
InvocationTargetExceptioninvoke(String, Class[], Object[]),
findMethod(java.lang.Class, java.lang.String, java.lang.Class[])protected Object getResource()
setResource(java.lang.Object)public void setResource(Object resource)
getResource()protected void setMBeanInfo(MBeanInfo info)
getMBeanInfo()protected MBeanInfo createMBeanInfo()
createMBeanAttributeInfo()createMBeanConstructorInfo()createMBeanOperationInfo()createMBeanNotificationInfo()getMBeanClassName()getMBeanDescription()
protected MBeanAttributeInfo[] createMBeanAttributeInfo()
protected MBeanConstructorInfo[] createMBeanConstructorInfo()
protected MBeanOperationInfo[] createMBeanOperationInfo()
protected MBeanNotificationInfo[] createMBeanNotificationInfo()
protected String getMBeanClassName()
protected String getMBeanDescription()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||