KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > MBeanDescription


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;
10
11 import java.lang.reflect.Constructor JavaDoc;
12 import java.lang.reflect.Method JavaDoc;
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  * @author <a HREF="mailto:biorn_steedom@users.sourceforge.net">Simone Bordet</a>
25  * @version $Revision: 1.3 $
26  */

27 public interface MBeanDescription
28 {
29    /**
30     * Should return the description of the MBean.
31     * For example: "This MBean is the rmiregistry service"
32     */

33     public String JavaDoc getMBeanDescription();
34    /**
35     * Should return the description for the given constructor of the MBean.
36     * For example: "Creates an rmiregistry instance on the specified port"
37     */

38     public String JavaDoc getConstructorDescription(Constructor JavaDoc ctor);
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 JavaDoc getConstructorParameterName(Constructor JavaDoc ctor, int index);
44    /**
45     * Should return the description for the constructor's parameter for the given constructor and parameter index.
46     * For example: "The port on which the rmiregistry will wait on for client requests"
47     */

48     public String JavaDoc getConstructorParameterDescription(Constructor JavaDoc ctor, int index);
49    /**
50     * Should return the description for the specified attribute.
51     * For example: "The port on which the rmiregistry will wait on for client requests"
52     */

53     public String JavaDoc getAttributeDescription(String JavaDoc attribute);
54    /**
55     * Should return the description for the specified operation.
56     * For example: "Binds the given object to the given name"
57     */

58     public String JavaDoc getOperationDescription(Method JavaDoc operation);
59    /**
60     * Should return the name of the operation's parameter for the given operation and parameter index.
61     * For example: "bindName"
62     */

63     public String JavaDoc getOperationParameterName(Method JavaDoc method, int index);
64    /**
65     * Should return the description for the operations's parameter for the given operation and parameter index.
66     * For example: "The name to which the object will be bound to"
67     */

68     public String JavaDoc getOperationParameterDescription(Method JavaDoc method, int index);
69 }
70
Popular Tags