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;
10:
11: import java.lang.reflect.Constructor;
12: import java.lang.reflect.Method;
13:
14: /**
15: * Implement this inteface to give descriptions to standard MBean. <p>
16: * The MX4J implementation will look, for every standard MBean, for a class with name composed by
17: * the fully qualified MBean class name + "MBeanDescription".
18: * If such a class is found, the MX4J implementation will call its methods to retrieve description
19: * information about the MBean itself.
20: * MBean descriptions are built-in in DynamicMBean, but not in standard MBeans.
21: * The <a href="http://xdoclet.sourceforge.net">XDoclet</a> tool is used to automate the process of
22: * generating the MBeanDescription classes for a given MBean, along with the MBean interface.
23: *
24: * @version $Revision: 1.5 $
25: */
26: public interface MBeanDescription {
27: /**
28: * Should return the description of the MBean.
29: * For example: "This MBean is the rmiregistry service"
30: */
31: public String getMBeanDescription();
32:
33: /**
34: * Should return the description for the given constructor of the MBean.
35: * For example: "Creates an rmiregistry instance on the specified port"
36: */
37: public String getConstructorDescription(Constructor ctor);
38:
39: /**
40: * Should return the name of the constructor's parameter for the given constructor and parameter index.
41: * For example: "port"
42: */
43: public String getConstructorParameterName(Constructor ctor,
44: int index);
45:
46: /**
47: * Should return the description for the constructor's parameter for the given constructor and parameter index.
48: * For example: "The port on which the rmiregistry will wait on for client requests"
49: */
50: public String getConstructorParameterDescription(Constructor ctor,
51: int index);
52:
53: /**
54: * Should return the description for the specified attribute.
55: * For example: "The port on which the rmiregistry will wait on for client requests"
56: */
57: public String getAttributeDescription(String attribute);
58:
59: /**
60: * Should return the description for the specified operation.
61: * For example: "Binds the given object to the given name"
62: */
63: public String getOperationDescription(Method operation);
64:
65: /**
66: * Should return the name of the operation's parameter for the given operation and parameter index.
67: * For example: "bindName"
68: */
69: public String getOperationParameterName(Method method, int index);
70:
71: /**
72: * Should return the description for the operations's parameter for the given operation and parameter index.
73: * For example: "The name to which the object will be bound to"
74: */
75: public String getOperationParameterDescription(Method method,
76: int index);
77: }
|