KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > management > openmbean > OpenMBeanAttributeInfo


1 /*
2  * @(#)OpenMBeanAttributeInfo.java 3.20 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8
9 package javax.management.openmbean;
10
11
12 // java import
13
//
14

15
16 // jmx import
17
//
18

19
20 /**
21  * <p>Describes an attribute of an open MBean.</p>
22  *
23  * <p>This interface declares the same methods as the class {@link
24  * javax.management.MBeanAttributeInfo}. A class implementing this
25  * interface (typically {@link OpenMBeanAttributeInfoSupport}) should
26  * extend {@link javax.management.MBeanAttributeInfo}.</p>
27  *
28  * @version 3.20 03/12/19
29  * @author Sun Microsystems, Inc.
30  *
31  * @since 1.5
32  * @since.unbundled JMX 1.1
33  */

34 public interface OpenMBeanAttributeInfo extends OpenMBeanParameterInfo JavaDoc {
35
36
37     // Re-declares the methods that are in class MBeanAttributeInfo of JMX 1.0
38
// (these will be removed when MBeanAttributeInfo is made a parent interface of this interface)
39

40     /**
41      * Returns <tt>true</tt> if the attribute described by this <tt>OpenMBeanAttributeInfo</tt> instance is readable,
42      * <tt>false</tt> otherwise.
43      *
44      * @return true if the attribute is readable.
45      */

46     public boolean isReadable() ;
47
48     /**
49      * Returns <tt>true</tt> if the attribute described by this <tt>OpenMBeanAttributeInfo</tt> instance is writable,
50      * <tt>false</tt> otherwise.
51      *
52      * @return true if the attribute is writable.
53      */

54     public boolean isWritable() ;
55
56     /**
57      * Returns <tt>true</tt> if the attribute described by this <tt>OpenMBeanAttributeInfo</tt> instance
58      * is accessed through a <tt>is<i>XXX</i></tt> getter (applies only to <tt>boolean</tt> and <tt>Boolean</tt> values),
59      * <tt>false</tt> otherwise.
60      *
61      * @return true if the attribute is accessed through <tt>is<i>XXX</i></tt>.
62      */

63     public boolean isIs() ;
64
65
66     // commodity methods
67
//
68

69     /**
70      * Compares the specified <var>obj</var> parameter with this <code>OpenMBeanAttributeInfo</code> instance for equality.
71      * <p>
72      * Returns <tt>true</tt> if and only if all of the following statements are true:
73      * <ul>
74      * <li><var>obj</var> is non null,</li>
75      * <li><var>obj</var> also implements the <code>OpenMBeanAttributeInfo</code> interface,</li>
76      * <li>their names are equal</li>
77      * <li>their open types are equal</li>
78      * <li>their access properties (isReadable, isWritable and isIs) are equal</li>
79      * <li>their default, min, max and legal values are equal.</li>
80      * </ul>
81      * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are
82      * different implementations of the <code>OpenMBeanAttributeInfo</code> interface.
83      * <br>&nbsp;
84      * @param obj the object to be compared for equality with this <code>OpenMBeanAttributeInfo</code> instance;
85      *
86      * @return <code>true</code> if the specified object is equal to this <code>OpenMBeanAttributeInfo</code> instance.
87      */

88     public boolean equals(Object JavaDoc obj);
89
90     /**
91      * Returns the hash code value for this <code>OpenMBeanAttributeInfo</code> instance.
92      * <p>
93      * The hash code of an <code>OpenMBeanAttributeInfo</code> instance is the sum of the hash codes
94      * of all elements of information used in <code>equals</code> comparisons
95      * (ie: its name, its <i>open type</i>, and its default, min, max and legal values).
96      * <p>
97      * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
98      * for any two <code>OpenMBeanAttributeInfo</code> instances <code>t1</code> and <code>t2</code>,
99      * as required by the general contract of the method
100      * {@link Object#hashCode() Object.hashCode()}.
101      * <p>
102      *
103      * @return the hash code value for this <code>OpenMBeanAttributeInfo</code> instance
104      */

105     public int hashCode();
106
107     /**
108      * Returns a string representation of this <code>OpenMBeanAttributeInfo</code> instance.
109      * <p>
110      * The string representation consists of the name of this class (ie <code>javax.management.openmbean.OpenMBeanAttributeInfo</code>),
111      * the string representation of the name and open type of the described attribute,
112      * and the string representation of its default, min, max and legal values.
113      *
114      * @return a string representation of this <code>OpenMBeanAttributeInfo</code> instance
115      */

116     public String JavaDoc toString();
117
118
119     // methods specific to open MBeans are inherited from
120
// OpenMBeanParameterInfo
121
//
122

123 }
124
Popular Tags