Package org.infinispan.jmx
Class ResourceDMBean
- java.lang.Object
-
- org.infinispan.jmx.ResourceDMBean
-
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration
public final class ResourceDMBean extends Object implements DynamicMBean, MBeanRegistration
This class was copied from JGroups and adapted. The original JGroup's ResourceDMBean logic has been modified so that invoke() method checks whether the operation called has been exposed as aManagedOperation, otherwise the call fails. JGroups deviated from this logic on purpose because they liked the fact that you could expose all class methods by simply annotating class withMBeanannotation.- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com, Galder ZamarreƱo
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)ObjectgetAttribute(String name)AttributeListgetAttributes(String[] names)MBeanInfogetMBeanInfo()ObjectNamegetObjectName()The ObjectName.inthashCode()Objectinvoke(String name, Object[] args, String[] sig)voidpostDeregister()voidpostRegister(Boolean registrationDone)voidpreDeregister()ObjectNamepreRegister(MBeanServer server, ObjectName name)voidsetAttribute(Attribute attribute)AttributeListsetAttributes(AttributeList list)StringtoString()
-
-
-
Method Detail
-
getObjectName
public ObjectName getObjectName()
The ObjectName. Only available if the MBean was registered.
-
getMBeanInfo
public MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfoin interfaceDynamicMBean
-
getAttribute
public Object getAttribute(String name) throws AttributeNotFoundException
- Specified by:
getAttributein interfaceDynamicMBean- Throws:
AttributeNotFoundException
-
setAttribute
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, MBeanException
- Specified by:
setAttributein interfaceDynamicMBean- Throws:
AttributeNotFoundExceptionMBeanException
-
getAttributes
public AttributeList getAttributes(String[] names)
- Specified by:
getAttributesin interfaceDynamicMBean
-
setAttributes
public AttributeList setAttributes(AttributeList list)
- Specified by:
setAttributesin interfaceDynamicMBean
-
invoke
public Object invoke(String name, Object[] args, String[] sig) throws MBeanException
- Specified by:
invokein interfaceDynamicMBean- Throws:
MBeanException
-
preRegister
public ObjectName preRegister(MBeanServer server, ObjectName name)
- Specified by:
preRegisterin interfaceMBeanRegistration
-
postRegister
public void postRegister(Boolean registrationDone)
- Specified by:
postRegisterin interfaceMBeanRegistration
-
preDeregister
public void preDeregister()
- Specified by:
preDeregisterin interfaceMBeanRegistration
-
postDeregister
public void postDeregister()
- Specified by:
postDeregisterin interfaceMBeanRegistration
-
-