author | avstepan |
Thu, 06 Aug 2015 13:59:10 +0300 | |
changeset 32034 | 05676cfd40b5 |
parent 25859 | 3317bb8137f4 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
24368 | 2 |
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
||
27 |
package javax.management.openmbean; |
|
28 |
||
29 |
||
30 |
// java import |
|
31 |
// |
|
32 |
||
33 |
||
34 |
// jmx import |
|
35 |
// |
|
36 |
||
37 |
||
38 |
/** |
|
39 |
* <p>Describes an attribute of an open MBean.</p> |
|
40 |
* |
|
41 |
* <p>This interface declares the same methods as the class {@link |
|
42 |
* javax.management.MBeanAttributeInfo}. A class implementing this |
|
43 |
* interface (typically {@link OpenMBeanAttributeInfoSupport}) should |
|
44 |
* extend {@link javax.management.MBeanAttributeInfo}.</p> |
|
45 |
* |
|
46 |
* |
|
47 |
* @since 1.5 |
|
48 |
*/ |
|
49 |
public interface OpenMBeanAttributeInfo extends OpenMBeanParameterInfo { |
|
50 |
||
51 |
||
52 |
// Re-declares the methods that are in class MBeanAttributeInfo of JMX 1.0 |
|
53 |
// (these will be removed when MBeanAttributeInfo is made a parent interface of this interface) |
|
54 |
||
55 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
56 |
* Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo} |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
57 |
* instance is readable, {@code false} otherwise. |
2 | 58 |
* |
59 |
* @return true if the attribute is readable. |
|
60 |
*/ |
|
61 |
public boolean isReadable() ; |
|
62 |
||
63 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
64 |
* Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo} |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
65 |
* instance is writable, {@code false} otherwise. |
2 | 66 |
* |
67 |
* @return true if the attribute is writable. |
|
68 |
*/ |
|
69 |
public boolean isWritable() ; |
|
70 |
||
71 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
72 |
* Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo} instance |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
73 |
* is accessed through a <code>is<i>XXX</i></code> getter |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
74 |
* (applies only to {@code boolean} and {@code Boolean} values), |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
75 |
* {@code false} otherwise. |
2 | 76 |
* |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
77 |
* @return true if the attribute is accessed through <code>is<i>XXX</i></code>. |
2 | 78 |
*/ |
79 |
public boolean isIs() ; |
|
80 |
||
81 |
||
82 |
// commodity methods |
|
83 |
// |
|
84 |
||
85 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
86 |
* Compares the specified <var>obj</var> parameter with this |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
87 |
* {@code OpenMBeanAttributeInfo} instance for equality. |
2 | 88 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
89 |
* Returns {@code true} if and only if all of the following statements are true: |
2 | 90 |
* <ul> |
91 |
* <li><var>obj</var> is non null,</li> |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
92 |
* <li><var>obj</var> also implements the {@code OpenMBeanAttributeInfo} interface,</li> |
2 | 93 |
* <li>their names are equal</li> |
94 |
* <li>their open types are equal</li> |
|
95 |
* <li>their access properties (isReadable, isWritable and isIs) are equal</li> |
|
96 |
* <li>their default, min, max and legal values are equal.</li> |
|
97 |
* </ul> |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
98 |
* This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
99 |
* different implementations of the {@code OpenMBeanAttributeInfo} interface. |
2 | 100 |
* <br> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
101 |
* @param obj the object to be compared for equality with this {@code OpenMBeanAttributeInfo} instance; |
2 | 102 |
* |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
103 |
* @return {@code true} if the specified object is equal to this {@code OpenMBeanAttributeInfo} instance. |
2 | 104 |
*/ |
105 |
public boolean equals(Object obj); |
|
106 |
||
107 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
108 |
* Returns the hash code value for this {@code OpenMBeanAttributeInfo} instance. |
2 | 109 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
110 |
* The hash code of an {@code OpenMBeanAttributeInfo} instance is the sum of the hash codes |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
111 |
* of all elements of information used in {@code equals} comparisons |
2 | 112 |
* (ie: its name, its <i>open type</i>, and its default, min, max and legal values). |
113 |
* <p> |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
114 |
* This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()} |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
115 |
* for any two {@code OpenMBeanAttributeInfo} instances {@code t1} and {@code t2}, |
2 | 116 |
* as required by the general contract of the method |
117 |
* {@link Object#hashCode() Object.hashCode()}. |
|
118 |
* |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
119 |
* @return the hash code value for this {@code OpenMBeanAttributeInfo} instance |
2 | 120 |
*/ |
121 |
public int hashCode(); |
|
122 |
||
123 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
124 |
* Returns a string representation of this {@code OpenMBeanAttributeInfo} instance. |
2 | 125 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
126 |
* The string representation consists of the name of this class |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
127 |
* (ie {@code javax.management.openmbean.OpenMBeanAttributeInfo}), |
2 | 128 |
* the string representation of the name and open type of the described attribute, |
129 |
* and the string representation of its default, min, max and legal values. |
|
130 |
* |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
131 |
* @return a string representation of this {@code OpenMBeanAttributeInfo} instance |
2 | 132 |
*/ |
133 |
public String toString(); |
|
134 |
||
135 |
||
136 |
// methods specific to open MBeans are inherited from |
|
137 |
// OpenMBeanParameterInfo |
|
138 |
// |
|
139 |
||
140 |
} |