Package org.infinispan.jmx
Class ResourceDMBean
- java.lang.Object
-
- org.infinispan.jmx.ResourceDMBean
-
- All Implemented Interfaces:
javax.management.DynamicMBean
public final class ResourceDMBean extends java.lang.Object implements javax.management.DynamicMBeanThis class was entirely copied from JGroups 2.7 (same name there). Couldn't simply reuse it because JGroups does not ship with MBean, ManagedAttribute and ManagedOperation. 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
-
-
Constructor Summary
Constructors Constructor Description ResourceDMBean(java.lang.Object instance, org.infinispan.factories.impl.MBeanMetadata mBeanMetadata, java.lang.String componentName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetAttribute(java.lang.String name)javax.management.AttributeListgetAttributes(java.lang.String[] names)javax.management.MBeanInfogetMBeanInfo()java.lang.StringgetObjectName()java.lang.Objectinvoke(java.lang.String name, java.lang.Object[] args, java.lang.String[] sig)voidsetAttribute(javax.management.Attribute attribute)javax.management.AttributeListsetAttributes(javax.management.AttributeList list)
-
-
-
Method Detail
-
getMBeanInfo
public javax.management.MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfoin interfacejavax.management.DynamicMBean
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name) throws javax.management.AttributeNotFoundException- Specified by:
getAttributein interfacejavax.management.DynamicMBean- Throws:
javax.management.AttributeNotFoundException
-
setAttribute
public void setAttribute(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.MBeanException- Specified by:
setAttributein interfacejavax.management.DynamicMBean- Throws:
javax.management.AttributeNotFoundExceptionjavax.management.MBeanException
-
getAttributes
public javax.management.AttributeList getAttributes(java.lang.String[] names)
- Specified by:
getAttributesin interfacejavax.management.DynamicMBean
-
setAttributes
public javax.management.AttributeList setAttributes(javax.management.AttributeList list)
- Specified by:
setAttributesin interfacejavax.management.DynamicMBean
-
invoke
public java.lang.Object invoke(java.lang.String name, java.lang.Object[] args, java.lang.String[] sig) throws javax.management.MBeanException- Specified by:
invokein interfacejavax.management.DynamicMBean- Throws:
javax.management.MBeanException
-
getObjectName
public java.lang.String getObjectName()
-
-