Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javax/management/openmbean/OpenMBeanParameterInfo.java


1   /*
2    * JBoss, the OpenSource J2EE webOS
3    *
4    * Distributable under LGPL license.
5    * See terms of license at gnu.org.
6    */
7   package javax.management.openmbean;
8   
9   import java.util.Set;
10  
11  /**
12   * An open MBean parameter info implements this interface as well as extending
13   * MBeanParameterInfo.<p>
14   * 
15   * {@link OpenMBeanParameterInfoSupport} is an example of such a class.
16   *
17   * @author  <a href="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>.
18   *
19   * @version $Revision: 1.1.2.1 $
20   *
21   */
22  public interface OpenMBeanParameterInfo
23  {
24     // Attributes ----------------------------------------------------
25  
26     // Constructors --------------------------------------------------
27  
28     // Public --------------------------------------------------------
29  
30     /**
31      * Retrieve a human readable description of the open MBean parameter the
32      * implementation of this interface describes.
33      *
34      * @return the description.
35      */
36     String getDescription();
37  
38     /**
39      * Retrieve the name of the parameter described.
40      *
41      * @return the name.
42      */
43     String getName();
44  
45     /**
46      * Retrieve the open type for this parameter
47      *
48      * @return the open type.
49      */
50     OpenType getOpenType();
51  
52     /**
53      * Retrieve the default value for this parameter or null if there is no
54      * default
55      *
56      * @return the default value
57      */
58     Object getDefaultValue();
59  
60     /**
61      * Retrieve the legal values values for this parameter or null if this
62      * is not specified
63      *
64      * @return the legal value
65      */
66     Set getLegalValues();
67  
68     /**
69      * Retrieve the minimum values values for this parameter or null if this
70      * is not specified
71      *
72      * @return the minimum value
73      */
74     Comparable getMinValue();
75  
76     /**
77      * Retrieve the maximum values values for this parameter or null if this
78      * is not specified
79      *
80      * @return the maximum value
81      */
82     Comparable getMaxValue();
83  
84     /**
85      * Discover wether this parameter has a default value specified
86      *
87      * @return true when a default value is specified or false otherwise
88      */
89     boolean hasDefaultValue();
90  
91     /**
92      * Discover wether this parameter has legal values specified
93      *
94      * @return true when the legal values are specified or false otherwise
95      */
96     boolean hasLegalValues();
97  
98     /**
99      * Discover wether this parameter has a minimum value specified
100     *
101     * @return true when a minimum value is specified or false otherwise
102     */
103    boolean hasMinValue();
104 
105    /**
106     * Discover wether this parameter has a maximum value specified
107     *
108     * @return true when a maximum value is specified or false otherwise
109     */
110    boolean hasMaxValue();
111 
112    /**
113     * Tests whether an object is acceptable as a paramter value
114     *
115     * @param obj the object to test
116     * @return true when it is a valid value, or false otherwise
117     */
118    boolean isValue(Object obj);
119 
120    /**
121     * Compares an object for equality with the implementing class.<p>
122     *
123     * The object is not null<br>
124     * The object implements the open mbean attribute info interface<br>
125     * The parameter names are equal<br>
126     * The open types are equal<br>
127     * The default, min, max and legal values are equal
128     *
129     * @param obj the object to test
130     * @return true when above is true, false otherwise
131     */
132    boolean equals(Object obj);
133 
134    /**
135     * Generates a hashcode for the implementation.<p>
136     *
137     * The sum of the hashCodes for the elements mentioned in the equals
138     * method
139     *
140     * @return the calculated hashcode
141     */
142    int hashCode();
143 
144    /**
145     * A string representation of the open mbean parameter info.<p>
146     *
147     * It is made up of implementation class and the values mentioned
148     * in the equals method
149     *
150     * @return the string
151     */
152    String toString();
153 }