KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > server > MBeanInvoker


1 /*
2  * Copyright (C) MX4J.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.server;
10
11 import javax.management.Attribute JavaDoc;
12 import javax.management.AttributeNotFoundException JavaDoc;
13 import javax.management.InvalidAttributeValueException JavaDoc;
14 import javax.management.MBeanException JavaDoc;
15 import javax.management.ReflectionException JavaDoc;
16
17 /**
18  * Invokes methods on standard MBeans. <br />
19  * Actually three implementations are available: two that uses reflection and one that generates on-the-fly a customized
20  * MBeanInvoker per each MBean and that is implemented with direct calls via bytecode generation. <br />
21  * The default is the direct call version, that uses the <a HREF="http://jakarta.apache.org/bcel">BCEL</a> to generate
22  * the required bytecode on-the-fly. <br>
23  * In the future may be the starting point for MBean interceptors.
24  *
25  * @author <a HREF="mailto:biorn_steedom@users.sourceforge.net">Simone Bordet</a>
26  * @version $Revision: 1.4 $
27  */

28 public interface MBeanInvoker
29 {
30     /**
31      * Invokes the specified operation on the MBean instance
32      */

33     public Object JavaDoc invoke(MBeanMetaData metadata, String JavaDoc method, String JavaDoc[] signature, Object JavaDoc[] args) throws MBeanException JavaDoc, ReflectionException JavaDoc;
34     /**
35      * Returns the value of the specified attribute.
36      */

37     public Object JavaDoc getAttribute(MBeanMetaData metadata, String JavaDoc attribute) throws MBeanException JavaDoc, AttributeNotFoundException JavaDoc, ReflectionException JavaDoc;
38     /**
39      * Sets the value of the specified attribute.
40      */

41     public void setAttribute(MBeanMetaData metadata, Attribute JavaDoc attribute) throws MBeanException JavaDoc, AttributeNotFoundException JavaDoc, InvalidAttributeValueException JavaDoc, ReflectionException JavaDoc;
42 }
43
Popular Tags