mx4j.server
Interface MBeanInvoker

All Known Implementing Classes:
ReflectedMBeanInvoker

public interface MBeanInvoker

Invokes methods on standard MBeans.

Actually two implementations are available: one that uses reflection and one that generates on-the-fly a customized MBeanInvoker per each particular MBean and that is implemented with direct calls.
The default is the direct call version, that uses the BCEL to generate the required bytecode on-the-fly.
In the future may be the starting point for MBean interceptors.

Version:
$Revision: 1.3 $
Author:
Simone Bordet

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[] signature, java.lang.Object[] args)
          Invokes the specified operation on the MBean instance
 void setAttribute(MBeanMetaData metadata, Attribute attribute)
          Sets the value of the specified attribute.
 

Method Detail

invoke

public java.lang.Object invoke(MBeanMetaData metadata,
                               java.lang.String method,
                               java.lang.String[] signature,
                               java.lang.Object[] args)
                        throws MBeanException,
                               ReflectionException
Invokes the specified operation on the MBean instance

Throws:
MBeanException
ReflectionException

getAttribute

public java.lang.Object getAttribute(MBeanMetaData metadata,
                                     java.lang.String attribute)
                              throws MBeanException,
                                     AttributeNotFoundException,
                                     ReflectionException
Returns the value of the specified attribute.

Throws:
MBeanException
AttributeNotFoundException
ReflectionException

setAttribute

public void setAttribute(MBeanMetaData metadata,
                         Attribute attribute)
                  throws MBeanException,
                         AttributeNotFoundException,
                         InvalidAttributeValueException,
                         ReflectionException
Sets the value of the specified attribute.

Throws:
MBeanException
AttributeNotFoundException
InvalidAttributeValueException
ReflectionException


Copyright © 2001-2002 MX4J Team. All Rights Reserved.