com.j256.simplejmx.server
Class ReflectionMbean
java.lang.Object
com.j256.simplejmx.server.ReflectionMbean
- All Implemented Interfaces:
- DynamicMBean
public class ReflectionMbean
- extends Object
- implements DynamicMBean
This wraps an object that has been registered in the server using JmxServer.register(Object)
. We wrap the
object so we can expose its attributes and operations using annotations and reflection. This handles the JMX server
calls to attributes and operations by calling through the delegation object.
- Author:
- graywatson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReflectionMbean
public ReflectionMbean(Object delegate,
String description)
- Create a mbean associated with a delegate object that must have a
JmxResource
annotation.
ReflectionMbean
public ReflectionMbean(Object delegate,
String description,
JmxAttributeFieldInfo[] attributeFieldInfos,
JmxAttributeMethodInfo[] attributeMethodInfos,
JmxOperationInfo[] operationInfos)
- Create a mbean associated with a delegate object with user provided attribute and operation information.
getMBeanInfo
public MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfo
in interface DynamicMBean
- See Also:
DynamicMBean.getMBeanInfo()
getAttribute
public Object getAttribute(String attributeName)
throws AttributeNotFoundException,
ReflectionException
- Specified by:
getAttribute
in interface DynamicMBean
- Throws:
AttributeNotFoundException
ReflectionException
- See Also:
DynamicMBean.getAttribute(String)
getAttributes
public AttributeList getAttributes(String[] attributeNames)
- Specified by:
getAttributes
in interface DynamicMBean
- See Also:
DynamicMBean.getAttributes(String[])
setAttribute
public void setAttribute(Attribute attribute)
throws AttributeNotFoundException,
ReflectionException
- Specified by:
setAttribute
in interface DynamicMBean
- Throws:
AttributeNotFoundException
ReflectionException
- See Also:
DynamicMBean.setAttribute(Attribute)
setAttributes
public AttributeList setAttributes(AttributeList attributes)
- Specified by:
setAttributes
in interface DynamicMBean
- See Also:
DynamicMBean.setAttributes(AttributeList)
invoke
public Object invoke(String actionName,
Object[] params,
String[] signatureTypes)
throws MBeanException,
ReflectionException
- Specified by:
invoke
in interface DynamicMBean
- Throws:
MBeanException
ReflectionException
- See Also:
DynamicMBean.invoke(String, Object[], String[])
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.