56 // Re-declares fields and methods that are in class MBeanOperationInfo of JMX 1.0 |
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) |
57 // (fields and methods will be removed when MBeanOperationInfo is made a parent interface of this interface) |
58 |
58 |
59 /** |
59 /** |
60 * Returns a human readable description of the operation |
60 * Returns a human readable description of the operation |
61 * described by this <tt>OpenMBeanOperationInfo</tt> instance. |
61 * described by this {@code OpenMBeanOperationInfo} instance. |
62 * |
62 * |
63 * @return the description. |
63 * @return the description. |
64 */ |
64 */ |
65 public String getDescription() ; |
65 public String getDescription() ; |
66 |
66 |
67 /** |
67 /** |
68 * Returns the name of the operation |
68 * Returns the name of the operation |
69 * described by this <tt>OpenMBeanOperationInfo</tt> instance. |
69 * described by this {@code OpenMBeanOperationInfo} instance. |
70 * |
70 * |
71 * @return the name. |
71 * @return the name. |
72 */ |
72 */ |
73 public String getName() ; |
73 public String getName() ; |
74 |
74 |
75 /** |
75 /** |
76 * Returns an array of <tt>OpenMBeanParameterInfo</tt> instances |
76 * Returns an array of {@code OpenMBeanParameterInfo} instances |
77 * describing each parameter in the signature of the operation |
77 * describing each parameter in the signature of the operation |
78 * described by this <tt>OpenMBeanOperationInfo</tt> instance. |
78 * described by this {@code OpenMBeanOperationInfo} instance. |
79 * Each instance in the returned array should actually be a |
79 * Each instance in the returned array should actually be a |
80 * subclass of <tt>MBeanParameterInfo</tt> which implements the |
80 * subclass of {@code MBeanParameterInfo} which implements the |
81 * <tt>OpenMBeanParameterInfo</tt> interface (typically {@link |
81 * {@code OpenMBeanParameterInfo} interface (typically {@link |
82 * OpenMBeanParameterInfoSupport}). |
82 * OpenMBeanParameterInfoSupport}). |
83 * |
83 * |
84 * @return the signature. |
84 * @return the signature. |
85 */ |
85 */ |
86 public MBeanParameterInfo[] getSignature() ; |
86 public MBeanParameterInfo[] getSignature() ; |
87 |
87 |
88 /** |
88 /** |
89 * Returns an <tt>int</tt> constant qualifying the impact of the |
89 * Returns an {@code int} constant qualifying the impact of the |
90 * operation described by this <tt>OpenMBeanOperationInfo</tt> |
90 * operation described by this {@code OpenMBeanOperationInfo} |
91 * instance. |
91 * instance. |
92 * |
92 * |
93 * The returned constant is one of {@link |
93 * The returned constant is one of {@link |
94 * javax.management.MBeanOperationInfo#INFO}, {@link |
94 * javax.management.MBeanOperationInfo#INFO}, {@link |
95 * javax.management.MBeanOperationInfo#ACTION}, {@link |
95 * javax.management.MBeanOperationInfo#ACTION}, {@link |
101 public int getImpact() ; |
101 public int getImpact() ; |
102 |
102 |
103 /** |
103 /** |
104 * Returns the fully qualified Java class name of the values |
104 * Returns the fully qualified Java class name of the values |
105 * returned by the operation described by this |
105 * returned by the operation described by this |
106 * <tt>OpenMBeanOperationInfo</tt> instance. This method should |
106 * {@code OpenMBeanOperationInfo} instance. This method should |
107 * return the same value as a call to |
107 * return the same value as a call to |
108 * <tt>getReturnOpenType().getClassName()</tt>. |
108 * {@code getReturnOpenType().getClassName()}. |
109 * |
109 * |
110 * @return the return type. |
110 * @return the return type. |
111 */ |
111 */ |
112 public String getReturnType() ; |
112 public String getReturnType() ; |
113 |
113 |
127 |
127 |
128 // commodity methods |
128 // commodity methods |
129 // |
129 // |
130 |
130 |
131 /** |
131 /** |
132 * Compares the specified <var>obj</var> parameter with this <code>OpenMBeanOperationInfo</code> instance for equality. |
132 * Compares the specified <var>obj</var> parameter with this {@code OpenMBeanOperationInfo} instance for equality. |
133 * <p> |
133 * <p> |
134 * Returns <tt>true</tt> if and only if all of the following statements are true: |
134 * Returns {@code true} if and only if all of the following statements are true: |
135 * <ul> |
135 * <ul> |
136 * <li><var>obj</var> is non null,</li> |
136 * <li><var>obj</var> is non null,</li> |
137 * <li><var>obj</var> also implements the <code>OpenMBeanOperationInfo</code> interface,</li> |
137 * <li><var>obj</var> also implements the {@code OpenMBeanOperationInfo} interface,</li> |
138 * <li>their names are equal</li> |
138 * <li>their names are equal</li> |
139 * <li>their signatures are equal</li> |
139 * <li>their signatures are equal</li> |
140 * <li>their return open types are equal</li> |
140 * <li>their return open types are equal</li> |
141 * <li>their impacts are equal</li> |
141 * <li>their impacts are equal</li> |
142 * </ul> |
142 * </ul> |
143 * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are |
143 * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are |
144 * different implementations of the <code>OpenMBeanOperationInfo</code> interface. |
144 * different implementations of the {@code OpenMBeanOperationInfo} interface. |
145 * <br> |
145 * <br> |
146 * @param obj the object to be compared for equality with this <code>OpenMBeanOperationInfo</code> instance; |
146 * @param obj the object to be compared for equality with this {@code OpenMBeanOperationInfo} instance; |
147 * |
147 * |
148 * @return <code>true</code> if the specified object is equal to this <code>OpenMBeanOperationInfo</code> instance. |
148 * @return {@code true} if the specified object is equal to this {@code OpenMBeanOperationInfo} instance. |
149 */ |
149 */ |
150 public boolean equals(Object obj); |
150 public boolean equals(Object obj); |
151 |
151 |
152 /** |
152 /** |
153 * Returns the hash code value for this <code>OpenMBeanOperationInfo</code> instance. |
153 * Returns the hash code value for this {@code OpenMBeanOperationInfo} instance. |
154 * <p> |
154 * <p> |
155 * The hash code of an <code>OpenMBeanOperationInfo</code> instance is the sum of the hash codes |
155 * The hash code of an {@code OpenMBeanOperationInfo} instance is the sum of the hash codes |
156 * of all elements of information used in <code>equals</code> comparisons |
156 * of all elements of information used in {@code equals} comparisons |
157 * (ie: its name, return open type, impact and signature, where the signature hashCode is calculated by a call to |
157 * (ie: its name, return open type, impact and signature, |
158 * <tt>java.util.Arrays.asList(this.getSignature).hashCode()</tt>). |
158 * where the signature hashCode is calculated by a call to |
|
159 * {@code java.util.Arrays.asList(this.getSignature).hashCode()}). |
159 * <p> |
160 * <p> |
160 * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code> |
161 * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()} |
161 * for any two <code>OpenMBeanOperationInfo</code> instances <code>t1</code> and <code>t2</code>, |
162 * for any two {@code OpenMBeanOperationInfo} instances {@code t1} and {@code t2}, |
162 * as required by the general contract of the method |
163 * as required by the general contract of the method |
163 * {@link Object#hashCode() Object.hashCode()}. |
164 * {@link Object#hashCode() Object.hashCode()}. |
164 * |
165 * |
165 * |
166 * |
166 * @return the hash code value for this <code>OpenMBeanOperationInfo</code> instance |
167 * @return the hash code value for this {@code OpenMBeanOperationInfo} instance |
167 */ |
168 */ |
168 public int hashCode(); |
169 public int hashCode(); |
169 |
170 |
170 /** |
171 /** |
171 * Returns a string representation of this <code>OpenMBeanOperationInfo</code> instance. |
172 * Returns a string representation of this {@code OpenMBeanOperationInfo} instance. |
172 * <p> |
173 * <p> |
173 * The string representation consists of the name of this class (ie <code>javax.management.openmbean.OpenMBeanOperationInfo</code>), |
174 * The string representation consists of the name of this class |
|
175 * (ie {@code javax.management.openmbean.OpenMBeanOperationInfo}), |
174 * and the name, signature, return open type and impact of the described operation. |
176 * and the name, signature, return open type and impact of the described operation. |
175 * |
177 * |
176 * @return a string representation of this <code>OpenMBeanOperationInfo</code> instance |
178 * @return a string representation of this {@code OpenMBeanOperationInfo} instance |
177 */ |
179 */ |
178 public String toString(); |
180 public String toString(); |
179 |
181 |
180 } |
182 } |