01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package mx4j.server;
10:
11: import javax.management.Attribute;
12: import javax.management.AttributeNotFoundException;
13: import javax.management.InvalidAttributeValueException;
14: import javax.management.MBeanException;
15: import javax.management.ReflectionException;
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: * @version $Revision: 1.6 $
26: */
27: public interface MBeanInvoker {
28: /**
29: * Invokes the specified operation on the MBean instance
30: */
31: public Object invoke(MBeanMetaData metadata, String method,
32: String[] signature, Object[] args) throws MBeanException,
33: ReflectionException;
34:
35: /**
36: * Returns the value of the specified attribute.
37: */
38: public Object getAttribute(MBeanMetaData metadata, String attribute)
39: throws MBeanException, AttributeNotFoundException,
40: ReflectionException;
41:
42: /**
43: * Sets the value of the specified attribute.
44: */
45: public void setAttribute(MBeanMetaData metadata, Attribute attribute)
46: throws MBeanException, AttributeNotFoundException,
47: InvalidAttributeValueException, ReflectionException;
48: }
|