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 |
import javax.management.MBeanParameterInfo; |
|
37 |
||
38 |
/** |
|
39 |
* <p>Describes an operation of an Open MBean.</p> |
|
40 |
* |
|
41 |
* <p>This interface declares the same methods as the class {@link |
|
42 |
* javax.management.MBeanOperationInfo}. A class implementing this |
|
43 |
* interface (typically {@link OpenMBeanOperationInfoSupport}) should |
|
44 |
* extend {@link javax.management.MBeanOperationInfo}.</p> |
|
45 |
* |
|
46 |
* <p>The {@link #getSignature()} method should return at runtime an |
|
47 |
* array of instances of a subclass of {@link MBeanParameterInfo} |
|
48 |
* which implements the {@link OpenMBeanParameterInfo} interface |
|
49 |
* (typically {@link OpenMBeanParameterInfoSupport}).</p> |
|
50 |
* |
|
51 |
* |
|
52 |
* @since 1.5 |
|
53 |
*/ |
|
54 |
public interface OpenMBeanOperationInfo { |
|
55 |
||
56 |
// Re-declares fields and methods that are in class MBeanOperationInfo of JMX 1.0 |
|
57 |
// (fields and methods will be removed when MBeanOperationInfo is made a parent interface of this interface) |
|
58 |
||
59 |
/** |
|
60 |
* Returns a human readable description of the operation |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
61 |
* described by this {@code OpenMBeanOperationInfo} instance. |
2 | 62 |
* |
63 |
* @return the description. |
|
64 |
*/ |
|
65 |
public String getDescription() ; |
|
66 |
||
67 |
/** |
|
68 |
* Returns the name of the operation |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
69 |
* described by this {@code OpenMBeanOperationInfo} instance. |
2 | 70 |
* |
71 |
* @return the name. |
|
72 |
*/ |
|
73 |
public String getName() ; |
|
74 |
||
75 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
76 |
* Returns an array of {@code OpenMBeanParameterInfo} instances |
2 | 77 |
* describing each parameter in the signature of the operation |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
78 |
* described by this {@code OpenMBeanOperationInfo} instance. |
2 | 79 |
* Each instance in the returned array should actually be a |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
80 |
* subclass of {@code MBeanParameterInfo} which implements the |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
81 |
* {@code OpenMBeanParameterInfo} interface (typically {@link |
2 | 82 |
* OpenMBeanParameterInfoSupport}). |
83 |
* |
|
84 |
* @return the signature. |
|
85 |
*/ |
|
86 |
public MBeanParameterInfo[] getSignature() ; |
|
87 |
||
88 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
89 |
* Returns an {@code int} constant qualifying the impact of the |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
90 |
* operation described by this {@code OpenMBeanOperationInfo} |
2 | 91 |
* instance. |
92 |
* |
|
93 |
* The returned constant is one of {@link |
|
94 |
* javax.management.MBeanOperationInfo#INFO}, {@link |
|
95 |
* javax.management.MBeanOperationInfo#ACTION}, {@link |
|
96 |
* javax.management.MBeanOperationInfo#ACTION_INFO}, or {@link |
|
97 |
* javax.management.MBeanOperationInfo#UNKNOWN}. |
|
98 |
* |
|
99 |
* @return the impact code. |
|
100 |
*/ |
|
101 |
public int getImpact() ; |
|
102 |
||
103 |
/** |
|
104 |
* Returns the fully qualified Java class name of the values |
|
105 |
* returned by the operation described by this |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
106 |
* {@code OpenMBeanOperationInfo} instance. This method should |
2 | 107 |
* return the same value as a call to |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
108 |
* {@code getReturnOpenType().getClassName()}. |
2 | 109 |
* |
110 |
* @return the return type. |
|
111 |
*/ |
|
112 |
public String getReturnType() ; |
|
113 |
||
114 |
||
115 |
// Now declares methods that are specific to open MBeans |
|
116 |
// |
|
117 |
||
118 |
/** |
|
119 |
* Returns the <i>open type</i> of the values returned by the |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
120 |
* operation described by this {@code OpenMBeanOperationInfo} |
2 | 121 |
* instance. |
122 |
* |
|
123 |
* @return the return type. |
|
124 |
*/ |
|
125 |
public OpenType<?> getReturnOpenType() ; // open MBean specific method |
|
126 |
||
127 |
||
128 |
// commodity methods |
|
129 |
// |
|
130 |
||
131 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
132 |
* Compares the specified <var>obj</var> parameter with this {@code OpenMBeanOperationInfo} instance for equality. |
2 | 133 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
134 |
* Returns {@code true} if and only if all of the following statements are true: |
2 | 135 |
* <ul> |
136 |
* <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
|
137 |
* <li><var>obj</var> also implements the {@code OpenMBeanOperationInfo} interface,</li> |
2 | 138 |
* <li>their names are equal</li> |
139 |
* <li>their signatures are equal</li> |
|
140 |
* <li>their return open types are equal</li> |
|
141 |
* <li>their impacts are equal</li> |
|
142 |
* </ul> |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
143 |
* 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
|
144 |
* different implementations of the {@code OpenMBeanOperationInfo} interface. |
2 | 145 |
* <br> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
146 |
* @param obj the object to be compared for equality with this {@code OpenMBeanOperationInfo} instance; |
2 | 147 |
* |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
148 |
* @return {@code true} if the specified object is equal to this {@code OpenMBeanOperationInfo} instance. |
2 | 149 |
*/ |
150 |
public boolean equals(Object obj); |
|
151 |
||
152 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
153 |
* Returns the hash code value for this {@code OpenMBeanOperationInfo} instance. |
2 | 154 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
155 |
* The hash code of an {@code OpenMBeanOperationInfo} 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
|
156 |
* of all elements of information used in {@code equals} comparisons |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
157 |
* (ie: its name, return open type, impact and signature, |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
158 |
* where the signature hashCode is calculated by a call to |
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
159 |
* {@code java.util.Arrays.asList(this.getSignature).hashCode()}). |
2 | 160 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
161 |
* 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
|
162 |
* for any two {@code OpenMBeanOperationInfo} instances {@code t1} and {@code t2}, |
2 | 163 |
* as required by the general contract of the method |
164 |
* {@link Object#hashCode() Object.hashCode()}. |
|
24368 | 165 |
* |
2 | 166 |
* |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
167 |
* @return the hash code value for this {@code OpenMBeanOperationInfo} instance |
2 | 168 |
*/ |
169 |
public int hashCode(); |
|
170 |
||
171 |
/** |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
172 |
* Returns a string representation of this {@code OpenMBeanOperationInfo} instance. |
2 | 173 |
* <p> |
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
174 |
* 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
|
175 |
* (ie {@code javax.management.openmbean.OpenMBeanOperationInfo}), |
2 | 176 |
* and the name, signature, return open type and impact of the described operation. |
177 |
* |
|
32034
05676cfd40b5
8133040: docs: replace <tt> tags (obsolete in html5) for java.management
avstepan
parents:
25859
diff
changeset
|
178 |
* @return a string representation of this {@code OpenMBeanOperationInfo} instance |
2 | 179 |
*/ |
180 |
public String toString(); |
|
181 |
||
182 |
} |