org.apache.felix.mosgi.jmx.agent.mx4j.server
Class ReflectedMBeanInvoker

java.lang.Object
  extended by org.apache.felix.mosgi.jmx.agent.mx4j.server.ReflectedMBeanInvoker
All Implemented Interfaces:
MBeanInvoker

public class ReflectedMBeanInvoker
extends java.lang.Object
implements MBeanInvoker

MBeanInvoker that uses reflection to invoke on MBean instances.

Version:
$Revision: 1.1.1.1 $
Author:
Simone Bordet

Constructor Summary
ReflectedMBeanInvoker()
           
 
Method Summary
 java.lang.Object getAttribute(MBeanMetaData metadata, java.lang.String attribute)
          Returns the value of the specified attribute.
 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)
           
 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
 

Constructor Detail

ReflectedMBeanInvoker

public ReflectedMBeanInvoker()
Method Detail

invoke

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
Description copied from interface: MBeanInvoker
Invokes the specified operation on the MBean instance

Specified by:
invoke in interface MBeanInvoker
Throws:
javax.management.MBeanException
javax.management.ReflectionException

getAttribute

public java.lang.Object getAttribute(MBeanMetaData metadata,
                                     java.lang.String attribute)
                              throws javax.management.MBeanException,
                                     javax.management.AttributeNotFoundException,
                                     javax.management.ReflectionException
Description copied from interface: MBeanInvoker
Returns the value of the specified attribute.

Specified by:
getAttribute in interface MBeanInvoker
Throws:
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.ReflectionException

setAttribute

public void setAttribute(MBeanMetaData metadata,
                         javax.management.Attribute attribute)
                  throws javax.management.MBeanException,
                         javax.management.AttributeNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.ReflectionException
Description copied from interface: MBeanInvoker
Sets the value of the specified attribute.

Specified by:
setAttribute in interface MBeanInvoker
Throws:
javax.management.MBeanException
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.ReflectionException

invokeImpl

protected java.lang.Object invokeImpl(MBeanMetaData metadata,
                                      java.lang.String method,
                                      java.lang.String[] signature,
                                      java.lang.Object[] args)
                               throws javax.management.ReflectionException,
                                      javax.management.MBeanException,
                                      java.lang.IllegalArgumentException
Throws:
javax.management.ReflectionException
javax.management.MBeanException
java.lang.IllegalArgumentException