mx4j.server
Class ReflectionMBeanInvoker
public
class
ReflectionMBeanInvoker
extends Object
implements MBeanInvoker
Stateless MBeanInvoker that uses reflection to invoke on MBean instances.
Version: $Revision: 1.6 $
Field Summary |
protected static Object[] | EMPTY_ARGS
A zero-length Object[] that indicates a parameterless argument list of a method |
protected static String[] | EMPTY_PARAMS
A zero-length String[] that indicates a parameterless signature of a method. |
Method Summary |
protected Object | doInvoke(MBeanMetaData metadata, String method, String[] signature, Object[] args)
Centralizes exception handling necessary to convert exceptions thrown by MBean's methods to
JMX exceptions. |
Object | getAttribute(MBeanMetaData metadata, String attribute) |
protected String | getMethodForAttribute(MBeanAttributeInfo attribute, boolean forRead)
Returns the method name for the given attribute. |
protected MBeanAttributeInfo | getStandardAttributeInfo(MBeanMetaData metadata, String attribute, boolean forWrite)
Returns the MBeanAttributeInfo for the given attribute, or null if the attribute
is not a management attribute. |
protected Method | getStandardManagementMethod(MBeanMetaData metadata, String name, String[] signature)
Returns a java.lang.reflect.Method object for the given method name and signature. |
protected MBeanOperationInfo | getStandardOperationInfo(MBeanMetaData metadata, String method, String[] signature)
Returns the MBeanOperationInfo for the given operation, or null if the operation
is not a management operation. |
Object | invoke(MBeanMetaData metadata, String method, String[] params, Object[] args) |
protected Object | invokeImpl(MBeanMetaData metadata, String method, String[] signature, Object[] args)
Performs the actual invocation of the MBean's method.
|
void | setAttribute(MBeanMetaData metadata, Attribute attribute) |
protected static final Object[] EMPTY_ARGS
A zero-length Object[] that indicates a parameterless argument list of a method
protected static final String[] EMPTY_PARAMS
A zero-length String[] that indicates a parameterless signature of a method.
protected Object doInvoke(
MBeanMetaData metadata, String method, String[] signature, Object[] args)
Centralizes exception handling necessary to convert exceptions thrown by MBean's methods to
JMX exceptions. Delegates the actual invocation to
ReflectionMBeanInvoker
public Object getAttribute(
MBeanMetaData metadata, String attribute)
protected String getMethodForAttribute(MBeanAttributeInfo attribute, boolean forRead)
Returns the method name for the given attribute.
protected MBeanAttributeInfo getStandardAttributeInfo(
MBeanMetaData metadata, String attribute, boolean forWrite)
Returns the MBeanAttributeInfo for the given attribute, or null if the attribute
is not a management attribute.
protected Method getStandardManagementMethod(
MBeanMetaData metadata, String name, String[] signature)
Returns a java.lang.reflect.Method object for the given method name and signature.
protected MBeanOperationInfo getStandardOperationInfo(
MBeanMetaData metadata, String method, String[] signature)
Returns the MBeanOperationInfo for the given operation, or null if the operation
is not a management operation.
public Object invoke(
MBeanMetaData metadata, String method, String[] params, Object[] args)
protected Object invokeImpl(
MBeanMetaData metadata, String method, String[] signature, Object[] args)
Performs the actual invocation of the MBean's method.
Exceptions thrown by the MBean's methods should not be catched, since
ReflectionMBeanInvoker
takes care of converting them to JMX exceptions.
public void setAttribute(
MBeanMetaData metadata, Attribute attribute)
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.