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 withMBean
annotation.- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com, Galder ZamarreƱo
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Object
getAttribute(String name)
AttributeList
getAttributes(String[] names)
MBeanInfo
getMBeanInfo()
ObjectName
getObjectName()
The ObjectName.int
hashCode()
Object
invoke(String name, Object[] args, String[] sig)
void
postDeregister()
void
postRegister(Boolean registrationDone)
void
preDeregister()
ObjectName
preRegister(MBeanServer server, ObjectName name)
void
setAttribute(Attribute attribute)
AttributeList
setAttributes(AttributeList list)
String
toString()
-
-
-
Method Detail
-
getObjectName
public ObjectName getObjectName()
The ObjectName. Only available if the MBean was registered.
-
getMBeanInfo
public MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfo
in interfaceDynamicMBean
-
getAttribute
public Object getAttribute(String name) throws AttributeNotFoundException
- Specified by:
getAttribute
in interfaceDynamicMBean
- Throws:
AttributeNotFoundException
-
setAttribute
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, MBeanException
- Specified by:
setAttribute
in interfaceDynamicMBean
- Throws:
AttributeNotFoundException
MBeanException
-
getAttributes
public AttributeList getAttributes(String[] names)
- Specified by:
getAttributes
in interfaceDynamicMBean
-
setAttributes
public AttributeList setAttributes(AttributeList list)
- Specified by:
setAttributes
in interfaceDynamicMBean
-
invoke
public Object invoke(String name, Object[] args, String[] sig) throws MBeanException
- Specified by:
invoke
in interfaceDynamicMBean
- Throws:
MBeanException
-
preRegister
public ObjectName preRegister(MBeanServer server, ObjectName name)
- Specified by:
preRegister
in interfaceMBeanRegistration
-
postRegister
public void postRegister(Boolean registrationDone)
- Specified by:
postRegister
in interfaceMBeanRegistration
-
preDeregister
public void preDeregister()
- Specified by:
preDeregister
in interfaceMBeanRegistration
-
postDeregister
public void postDeregister()
- Specified by:
postDeregister
in interfaceMBeanRegistration
-
-