|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mx4j.server.ReflectionMBeanInvoker
Stateless MBeanInvoker that uses reflection to invoke on MBean instances.
Field Summary | |
protected static java.lang.Object[] |
EMPTY_ARGS
A zero-length Object[] that indicates a parameterless argument list of a method |
protected static java.lang.String[] |
EMPTY_PARAMS
A zero-length String[] that indicates a parameterless signature of a method. |
Constructor Summary | |
ReflectionMBeanInvoker()
|
Method Summary | |
protected java.lang.Object |
doInvoke(MBeanMetaData metadata,
java.lang.String method,
java.lang.String[] signature,
java.lang.Object[] args)
Centralizes exception handling necessary to convert exceptions thrown by MBean's methods to JMX exceptions. |
java.lang.Object |
getAttribute(MBeanMetaData metadata,
java.lang.String attribute)
Returns the value of the specified attribute. |
protected java.lang.String |
getMethodForAttribute(javax.management.MBeanAttributeInfo attribute,
boolean forRead)
Returns the method name for the given attribute. |
protected javax.management.MBeanAttributeInfo |
getStandardAttributeInfo(MBeanMetaData metadata,
java.lang.String attribute,
boolean forWrite)
Returns the MBeanAttributeInfo for the given attribute, or null if the attribute is not a management attribute. |
protected java.lang.reflect.Method |
getStandardManagementMethod(MBeanMetaData metadata,
java.lang.String name,
java.lang.String[] signature)
Returns a java.lang.reflect.Method object for the given method name and signature. |
protected javax.management.MBeanOperationInfo |
getStandardOperationInfo(MBeanMetaData metadata,
java.lang.String method,
java.lang.String[] signature)
Returns the MBeanOperationInfo for the given operation, or null if the operation is not a management operation. |
java.lang.Object |
invoke(MBeanMetaData metadata,
java.lang.String method,
java.lang.String[] params,
java.lang.Object[] args)
Invokes the specified operation on the MBean instance |
protected java.lang.Object |
invokeImpl(MBeanMetaData metadata,
java.lang.String method,
java.lang.String[] signature,
java.lang.Object[] args)
Performs the actual invocation of the MBean's method. |
void |
setAttribute(MBeanMetaData metadata,
javax.management.Attribute attribute)
Sets the value of the specified attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String[] EMPTY_PARAMS
protected static final java.lang.Object[] EMPTY_ARGS
Constructor Detail |
public ReflectionMBeanInvoker()
Method Detail |
public java.lang.Object invoke(MBeanMetaData metadata, java.lang.String method, java.lang.String[] params, java.lang.Object[] args) throws javax.management.MBeanException, javax.management.ReflectionException
MBeanInvoker
invoke
in interface MBeanInvoker
javax.management.MBeanException
javax.management.ReflectionException
public java.lang.Object getAttribute(MBeanMetaData metadata, java.lang.String attribute) throws javax.management.MBeanException, javax.management.AttributeNotFoundException, javax.management.ReflectionException
MBeanInvoker
getAttribute
in interface MBeanInvoker
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.ReflectionException
public void setAttribute(MBeanMetaData metadata, javax.management.Attribute attribute) throws javax.management.MBeanException, javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.ReflectionException
MBeanInvoker
setAttribute
in interface MBeanInvoker
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.ReflectionException
protected java.lang.Object doInvoke(MBeanMetaData metadata, java.lang.String method, java.lang.String[] signature, java.lang.Object[] args) throws javax.management.ReflectionException, javax.management.MBeanException, mx4j.server.ReflectionMBeanInvoker.BadArgumentException
invokeImpl(mx4j.server.MBeanMetaData, java.lang.String, java.lang.String[], java.lang.Object[])
javax.management.ReflectionException
javax.management.MBeanException
mx4j.server.ReflectionMBeanInvoker.BadArgumentException
protected java.lang.Object invokeImpl(MBeanMetaData metadata, java.lang.String method, java.lang.String[] signature, java.lang.Object[] args) throws java.lang.Throwable
doInvoke(mx4j.server.MBeanMetaData, java.lang.String, java.lang.String[], java.lang.Object[])
takes care of converting them to JMX exceptions.
java.lang.Throwable
protected javax.management.MBeanOperationInfo getStandardOperationInfo(MBeanMetaData metadata, java.lang.String method, java.lang.String[] signature)
protected javax.management.MBeanAttributeInfo getStandardAttributeInfo(MBeanMetaData metadata, java.lang.String attribute, boolean forWrite)
protected java.lang.String getMethodForAttribute(javax.management.MBeanAttributeInfo attribute, boolean forRead)
protected java.lang.reflect.Method getStandardManagementMethod(MBeanMetaData metadata, java.lang.String name, java.lang.String[] signature) throws javax.management.ReflectionException
javax.management.ReflectionException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |