author | prr |
Mon, 04 Nov 2019 10:01:55 -0800 | |
changeset 59176 | f5adbf111424 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
44858
7183899b064b
8179415: Update java.management and java.management.rmi to be HTML-5 friendly
ksrini
parents:
25859
diff
changeset
|
2 |
* Copyright (c) 2000, 2017, 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 |
* @author IBM Corp. |
|
27 |
* |
|
28 |
* Copyright IBM Corp. 1999-2000. All rights reserved. |
|
29 |
*/ |
|
30 |
||
31 |
package javax.management; |
|
32 |
||
33 |
import java.io.Serializable; |
|
34 |
||
35 |
// Javadoc imports: |
|
36 |
import java.lang.management.MemoryUsage; |
|
37 |
import java.util.Arrays; |
|
1570
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
38 |
import java.util.Locale; |
2 | 39 |
import java.util.ResourceBundle; |
40 |
import javax.management.openmbean.CompositeData; |
|
41 |
import javax.management.openmbean.OpenMBeanAttributeInfoSupport; |
|
42 |
import javax.management.openmbean.OpenMBeanOperationInfoSupport; |
|
43 |
import javax.management.openmbean.OpenMBeanParameterInfoSupport; |
|
44 |
import javax.management.openmbean.OpenType; |
|
45 |
||
46 |
/** |
|
47 |
* <p>Additional metadata for a JMX element. A {@code Descriptor} |
|
48 |
* is associated with a {@link MBeanInfo}, {@link MBeanAttributeInfo}, etc. |
|
49 |
* It consists of a collection of fields. A field is a name and an |
|
50 |
* associated value.</p> |
|
51 |
* |
|
52 |
* <p>Field names are not case-sensitive. The names {@code descriptorType}, |
|
53 |
* {@code descriptortype}, and {@code DESCRIPTORTYPE} are all equivalent. |
|
54 |
* However, the case that was used when the field was first set is preserved |
|
55 |
* in the result of the {@link #getFields} and {@link #getFieldNames} |
|
56 |
* methods.</p> |
|
57 |
* |
|
58 |
* <p>Not all field names and values are predefined. |
|
59 |
* New fields can be defined and added by any program.</p> |
|
60 |
* |
|
61 |
* <p>A descriptor can be mutable or immutable. |
|
62 |
* An immutable descriptor, once created, never changes. |
|
63 |
* The <code>Descriptor</code> methods that could modify the contents |
|
64 |
* of the descriptor will throw an exception |
|
65 |
* for an immutable descriptor. Immutable descriptors are usually |
|
66 |
* instances of {@link ImmutableDescriptor} or a subclass. Mutable |
|
67 |
* descriptors are usually instances of |
|
68 |
* {@link javax.management.modelmbean.DescriptorSupport} or a subclass. |
|
69 |
* |
|
70 |
* <p>Certain fields are used by the JMX implementation. This means |
|
71 |
* either that the presence of the field may change the behavior of |
|
72 |
* the JMX API or that the field may be set in descriptors returned by |
|
73 |
* the JMX API. These fields appear in <i>italics</i> in the table |
|
74 |
* below, and each one has a corresponding constant in the {@link JMX} |
|
75 |
* class. For example, the field {@code defaultValue} is represented |
|
76 |
* by the constant {@link JMX#DEFAULT_VALUE_FIELD}.</p> |
|
77 |
* |
|
78 |
* <p>Certain other fields have conventional meanings described in the |
|
79 |
* table below but they are not required to be understood or set by |
|
80 |
* the JMX implementation.</p> |
|
81 |
* |
|
82 |
* <p>Field names defined by the JMX specification in this and all |
|
83 |
* future versions will never contain a period (.). Users can safely |
|
84 |
* create their own fields by including a period in the name and be |
|
85 |
* sure that these names will not collide with any future version of |
|
86 |
* the JMX API. It is recommended to follow the Java package naming |
|
87 |
* convention to avoid collisions between field names from different |
|
88 |
* origins. For example, a field created by {@code example.com} might |
|
89 |
* have the name {@code com.example.interestLevel}.</p> |
|
90 |
* |
|
91 |
* <p>Note that the values in the {@code defaultValue}, {@code |
|
92 |
* legalValues}, {@code maxValue}, and {@code minValue} fields should |
|
93 |
* be consistent with the type returned by the {@code getType()} |
|
94 |
* method for the associated {@code MBeanAttributeInfo} or {@code |
|
95 |
* MBeanParameterInfo}. For MXBeans, this means that they should be |
|
96 |
* of the mapped Java type, called <em>opendata</em>(J) in the <a |
|
97 |
* href="MXBean.html#mapping-rules">MXBean type mapping rules</a>.</p> |
|
98 |
* |
|
45130
469dceb426cc
8179631: Fix Html5 errors in java.management, jdk.management, jdk.jdi and jdk.attach
ksrini
parents:
44858
diff
changeset
|
99 |
* <table class="striped"> |
44858
7183899b064b
8179415: Update java.management and java.management.rmi to be HTML-5 friendly
ksrini
parents:
25859
diff
changeset
|
100 |
* <caption style="display:none">Descriptor Fields</caption> |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
101 |
* <thead> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
102 |
* <tr><th scope="col">Name</th> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
103 |
* <th scope="col">Type</th> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
104 |
* <th scope="col">Used in</th> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
105 |
* <th scope="col">Meaning</th></tr> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
106 |
* </thead> |
2 | 107 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
108 |
* <tbody style="text-align:left"> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
109 |
* <tr id="defaultValue"><th scope="row"><i>defaultValue</i><td>Object</td> |
2 | 110 |
* <td>MBeanAttributeInfo<br>MBeanParameterInfo</td> |
111 |
* |
|
112 |
* <td>Default value for an attribute or parameter. See |
|
113 |
* {@link javax.management.openmbean}.</td> |
|
114 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
115 |
* <tr><th scope="row">deprecated</th><td>String</td><td>Any</td> |
2 | 116 |
* |
117 |
* <td>An indication that this element of the information model is no |
|
118 |
* longer recommended for use. A set of MBeans defined by an |
|
119 |
* application is collectively called an <em>information model</em>. |
|
120 |
* The convention is for the value of this field to contain a string |
|
121 |
* that is the version of the model in which the element was first |
|
122 |
* deprecated, followed by a space, followed by an explanation of the |
|
123 |
* deprecation, for example {@code "1.3 Replaced by the Capacity |
|
124 |
* attribute"}.</td> |
|
125 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
126 |
* <tr><th scope="row" id="descriptionResourceBundleBaseName">descriptionResource<br> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
127 |
* BundleBaseName</th><td>String</td><td>Any</td> |
2 | 128 |
* |
129 |
* <td>The base name for the {@link ResourceBundle} in which the key given in |
|
130 |
* the {@code descriptionResourceKey} field can be found, for example |
|
4156 | 131 |
* {@code "com.example.myapp.MBeanResources"}. The meaning of this |
132 |
* field is defined by this specification but the field is not set or |
|
133 |
* used by the JMX API itself.</td> |
|
2 | 134 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
135 |
* <tr><th scope="row" id="descriptionResourceKey">descriptionResourceKey</th> |
1570
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
136 |
* <td>String</td><td>Any</td> |
2 | 137 |
* |
138 |
* <td>A resource key for the description of this element. In |
|
139 |
* conjunction with the {@code descriptionResourceBundleBaseName}, |
|
1570
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
140 |
* this can be used to find a localized version of the description. |
4156 | 141 |
* The meaning of this field is defined by this specification but the |
142 |
* field is not set or used by the JMX API itself.</td> |
|
2 | 143 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
144 |
* <tr><th scope="row">enabled</th><td>String</td> |
2 | 145 |
* <td>MBeanAttributeInfo<br>MBeanNotificationInfo<br>MBeanOperationInfo</td> |
146 |
* |
|
147 |
* <td>The string {@code "true"} or {@code "false"} according as this |
|
148 |
* item is enabled. When an attribute or operation is not enabled, it |
|
149 |
* exists but cannot currently be accessed. A user interface might |
|
150 |
* present it as a greyed-out item. For example, an attribute might |
|
151 |
* only be meaningful after the {@code start()} method of an MBean has |
|
152 |
* been called, and is otherwise disabled. Likewise, a notification |
|
153 |
* might be disabled if it cannot currently be emitted but could be in |
|
154 |
* other circumstances.</td> |
|
155 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
156 |
* <tr id="exceptions"><th scope="row">exceptions<td>String[]</td> |
1699
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
157 |
* <td>MBeanAttributeInfo, MBeanConstructorInfo, MBeanOperationInfo</td> |
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
158 |
* |
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
159 |
* <td>The class names of the exceptions that can be thrown when invoking a |
4156 | 160 |
* constructor or operation, or getting an attribute. The meaning of this field |
161 |
* is defined by this specification but the field is not set or used by the |
|
162 |
* JMX API itself. Exceptions thrown when |
|
1699
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
163 |
* setting an attribute are specified by the field |
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
164 |
* <a href="#setExceptions">{@code setExceptions}</a>. |
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
165 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
166 |
* <tr id="immutableInfo"><th scope="row"><i>immutableInfo</i><td>String</td> |
2 | 167 |
* <td>MBeanInfo</td> |
168 |
* |
|
169 |
* <td>The string {@code "true"} or {@code "false"} according as this |
|
170 |
* MBean's MBeanInfo is <em>immutable</em>. When this field is true, |
|
171 |
* the MBeanInfo for the given MBean is guaranteed not to change over |
|
172 |
* the lifetime of the MBean. Hence, a client can read it once and |
|
173 |
* cache the read value. When this field is false or absent, there is |
|
174 |
* no such guarantee, although that does not mean that the MBeanInfo |
|
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
175 |
* will necessarily change. See also the <a |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
176 |
* href="MBeanInfo.html#info-changed">{@code "jmx.mbean.info.changed"}</a> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
177 |
* notification.</td> |
2 | 178 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
179 |
* <tr id="infoTimeout"><th scope="row">infoTimeout</th><td>String<br>Long</td><td>MBeanInfo</td> |
2 | 180 |
* |
1570
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
181 |
* <td>The time in milli-seconds that the MBeanInfo can reasonably be |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
182 |
* expected to be unchanged. The value can be a {@code Long} or a |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
183 |
* decimal string. This provides a hint from a DynamicMBean or any |
2 | 184 |
* MBean that does not define {@code immutableInfo} as {@code true} |
185 |
* that the MBeanInfo is not likely to change within this period and |
|
186 |
* therefore can be cached. When this field is missing or has the |
|
187 |
* value zero, it is not recommended to cache the MBeanInfo unless it |
|
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
188 |
* has the {@code immutableInfo} set to {@code true} or it has <a |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
189 |
* href="MBeanInfo.html#info-changed">{@code "jmx.mbean.info.changed"}</a> in |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
190 |
* its {@link MBeanNotificationInfo} array.</td></tr> |
2 | 191 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
192 |
* <tr id="interfaceClassName"><th scope="row"><i>interfaceClassName</i></th> |
2 | 193 |
* <td>String</td><td>MBeanInfo</td> |
194 |
* |
|
195 |
* <td>The Java interface name for a Standard MBean or MXBean, as |
|
196 |
* returned by {@link Class#getName()}. A Standard MBean or MXBean |
|
197 |
* registered directly in the MBean Server or created using the {@link |
|
198 |
* StandardMBean} class will have this field in its MBeanInfo |
|
199 |
* Descriptor.</td> |
|
200 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
201 |
* <tr id="legalValues"><th scope="row"><i>legalValues</i></th> |
2 | 202 |
* <td>{@literal Set<?>}</td><td>MBeanAttributeInfo<br>MBeanParameterInfo</td> |
203 |
* |
|
204 |
* <td>Legal values for an attribute or parameter. See |
|
205 |
* {@link javax.management.openmbean}.</td> |
|
206 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
207 |
* <tr id="locale"><th scope="row">locale</th> |
1570
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
208 |
* <td>String</td><td>Any</td> |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
209 |
* |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
210 |
* <td>The {@linkplain Locale locale} of the description in this |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
211 |
* {@code MBeanInfo}, {@code MBeanAttributeInfo}, etc, as returned |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
212 |
* by {@link Locale#toString()}.</td> |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1513
diff
changeset
|
213 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
214 |
* <tr id="maxValue"><th scope="row"><i>maxValue</i><td>Object</td> |
2 | 215 |
* <td>MBeanAttributeInfo<br>MBeanParameterInfo</td> |
216 |
* |
|
217 |
* <td>Maximum legal value for an attribute or parameter. See |
|
218 |
* {@link javax.management.openmbean}.</td> |
|
219 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
220 |
* <tr id="metricType"><th scope="row">metricType</th><td>String</td> |
2 | 221 |
* <td>MBeanAttributeInfo<br>MBeanOperationInfo</td> |
222 |
* |
|
223 |
* <td>The type of a metric, one of the strings "counter" or "gauge". |
|
224 |
* A metric is a measurement exported by an MBean, usually an |
|
225 |
* attribute but sometimes the result of an operation. A metric that |
|
226 |
* is a <em>counter</em> has a value that never decreases except by |
|
227 |
* being reset to a starting value. Counter metrics are almost always |
|
228 |
* non-negative integers. An example might be the number of requests |
|
229 |
* received. A metric that is a <em>gauge</em> has a numeric value |
|
230 |
* that can increase or decrease. Examples might be the number of |
|
231 |
* open connections or a cache hit rate or a temperature reading. |
|
232 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
233 |
* <tr id="minValue"><th scope="row"><i>minValue</i><td>Object</td> |
2 | 234 |
* <td>MBeanAttributeInfo<br>MBeanParameterInfo</td> |
235 |
* |
|
236 |
* <td>Minimum legal value for an attribute or parameter. See |
|
237 |
* {@link javax.management.openmbean}.</td> |
|
238 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
239 |
* <tr id="mxbean"><th scope="row"><i>mxbean</i><td>String</td> |
2 | 240 |
* <td>MBeanInfo</td> |
241 |
* |
|
242 |
* <td>The string {@code "true"} or {@code "false"} according as this |
|
243 |
* MBean is an {@link MXBean}. A Standard MBean or MXBean registered |
|
244 |
* directly with the MBean Server or created using the {@link |
|
245 |
* StandardMBean} class will have this field in its MBeanInfo |
|
246 |
* Descriptor.</td> |
|
247 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
248 |
* <tr id="openType"><th scope="row"><i>openType</i><td>{@link OpenType}</td> |
2 | 249 |
* <td>MBeanAttributeInfo<br>MBeanOperationInfo<br>MBeanParameterInfo</td> |
250 |
* |
|
251 |
* <td><p>The Open Type of this element. In the case of {@code |
|
252 |
* MBeanAttributeInfo} and {@code MBeanParameterInfo}, this is the |
|
253 |
* Open Type of the attribute or parameter. In the case of {@code |
|
254 |
* MBeanOperationInfo}, it is the Open Type of the return value. This |
|
255 |
* field is set in the Descriptor for all instances of {@link |
|
256 |
* OpenMBeanAttributeInfoSupport}, {@link |
|
257 |
* OpenMBeanOperationInfoSupport}, and {@link |
|
258 |
* OpenMBeanParameterInfoSupport}. It is also set for attributes, |
|
259 |
* operations, and parameters of MXBeans.</p> |
|
260 |
* |
|
261 |
* <p>This field can be set for an {@code MBeanNotificationInfo}, in |
|
262 |
* which case it indicates the Open Type that the {@link |
|
263 |
* Notification#getUserData() user data} will have.</td> |
|
264 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
265 |
* <tr id="originalType"><th scope="row"><i>originalType</i><td>String</td> |
2 | 266 |
* <td>MBeanAttributeInfo<br>MBeanOperationInfo<br>MBeanParameterInfo</td> |
267 |
* |
|
268 |
* <td><p>The original Java type of this element as it appeared in the |
|
269 |
* {@link MXBean} interface method that produced this {@code |
|
270 |
* MBeanAttributeInfo} (etc). For example, a method<br> <code>public |
|
271 |
* </code> {@link MemoryUsage}<code> getHeapMemoryUsage();</code><br> |
|
272 |
* in an MXBean interface defines an attribute called {@code |
|
273 |
* HeapMemoryUsage} of type {@link CompositeData}. The {@code |
|
274 |
* originalType} field in the Descriptor for this attribute will have |
|
275 |
* the value {@code "java.lang.management.MemoryUsage"}. |
|
276 |
* |
|
277 |
* <p>The format of this string is described in the section <a |
|
278 |
* href="MXBean.html#type-names">Type Names</a> of the MXBean |
|
279 |
* specification.</p> |
|
280 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
281 |
* <tr id="setExceptions"><th scope="row"><i>setExceptions</i><td>String[]</td> |
1699
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
282 |
* <td>MBeanAttributeInfo</td> |
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
283 |
* |
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
284 |
* <td>The class names of the exceptions that can be thrown when setting |
4156 | 285 |
* an attribute. The meaning of this field |
286 |
* is defined by this specification but the field is not set or used by the |
|
287 |
* JMX API itself. Exceptions thrown when getting an attribute are specified |
|
1699
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
288 |
* by the field <a href="#exceptions">{@code exceptions}</a>. |
3611e5fd6da5
6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents:
1570
diff
changeset
|
289 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
290 |
* <tr><th scope="row">severity</th><td>String<br>Integer</td> |
2 | 291 |
* <td>MBeanNotificationInfo</td> |
292 |
* |
|
293 |
* <td>The severity of this notification. It can be 0 to mean |
|
294 |
* unknown severity or a value from 1 to 6 representing decreasing |
|
295 |
* levels of severity. It can be represented as a decimal string or |
|
296 |
* an {@code Integer}.</td> |
|
297 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
298 |
* <tr><th scope="row">since</th><td>String</td><td>Any</td> |
2 | 299 |
* |
300 |
* <td>The version of the information model in which this element |
|
301 |
* was introduced. A set of MBeans defined by an application is |
|
302 |
* collectively called an <em>information model</em>. The |
|
303 |
* application may also define versions of this model, and use the |
|
304 |
* {@code "since"} field to record the version in which an element |
|
305 |
* first appeared.</td> |
|
306 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
307 |
* <tr><th scope="row">units</th><td>String</td> |
2 | 308 |
* <td>MBeanAttributeInfo<br>MBeanParameterInfo<br>MBeanOperationInfo</td> |
309 |
* |
|
310 |
* <td>The units in which an attribute, parameter, or operation return |
|
311 |
* value is measured, for example {@code "bytes"} or {@code |
|
312 |
* "seconds"}.</td> |
|
313 |
* |
|
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
314 |
* </tbody> |
2 | 315 |
* </table> |
316 |
* |
|
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
317 |
* <p>Some additional fields are defined by Model MBeans. See the |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
318 |
* information for <a href="modelmbean/ModelMBeanInfo.html#descriptor"><!-- |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
319 |
* -->{@code ModelMBeanInfo}</a>, |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
320 |
* <a href="modelmbean/ModelMBeanAttributeInfo.html#descriptor"><!-- |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
321 |
* -->{@code ModelMBeanAttributeInfo}</a>, |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
322 |
* <a href="modelmbean/ModelMBeanConstructorInfo.html#descriptor"><!-- |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
323 |
* -->{@code ModelMBeanConstructorInfo}</a>, |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
324 |
* <a href="modelmbean/ModelMBeanNotificationInfo.html#descriptor"><!-- |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
325 |
* -->{@code ModelMBeanNotificationInfo}</a>, and |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
326 |
* <a href="modelmbean/ModelMBeanOperationInfo.html#descriptor"><!-- |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
327 |
* -->{@code ModelMBeanOperationInfo}</a>, as |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
328 |
* well as the chapter "Model MBeans" of the <a |
20455
f6f9a0c2796b
8020688: Broken links in documentation at http://docs.oracle.com/javase/6/docs/api/index.
mcherkas
parents:
5506
diff
changeset
|
329 |
* href="http://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html">JMX |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
330 |
* Specification</a>. The following table summarizes these fields. Note |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
331 |
* that when the Type in this table is Number, a String that is the decimal |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
332 |
* representation of a Long can also be used.</p> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
333 |
* |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
334 |
* <p>Nothing prevents the use of these fields in MBeans that are not Model |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
335 |
* MBeans. The <a href="#displayName">displayName</a>, <a href="#severity"><!-- |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
336 |
* -->severity</a>, and <a href="#visibility">visibility</a> fields are of |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
337 |
* interest outside Model MBeans, for example. But only Model MBeans have |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
338 |
* a predefined behavior for these fields.</p> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
339 |
* |
45130
469dceb426cc
8179631: Fix Html5 errors in java.management, jdk.management, jdk.jdi and jdk.attach
ksrini
parents:
44858
diff
changeset
|
340 |
* <table class="striped"> |
44858
7183899b064b
8179415: Update java.management and java.management.rmi to be HTML-5 friendly
ksrini
parents:
25859
diff
changeset
|
341 |
* <caption style="display:none">ModelMBean Fields</caption> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
342 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
343 |
* <thead> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
344 |
* <tr><th scope="col">Name</th> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
345 |
* <th scope="col">Type</th> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
346 |
* <th scope="col">Used in</th> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
347 |
* <th scope="col">Meaning</th></tr> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
348 |
* </thead> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
349 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
350 |
* <tbody style="text-align:left"> |
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
351 |
* <tr><th scope="row">class</th><td>String</td><td>ModelMBeanOperationInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
352 |
* <td>Class where method is defined (fully qualified).</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
353 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
354 |
* <tr><th scope="row">currencyTimeLimit</th><td>Number</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
355 |
* <td>ModelMBeanInfo<br>ModelMBeanAttributeInfo<br>ModelMBeanOperationInfo</td> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
356 |
* <td>How long cached value is valid: <0 never, =0 always, |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
357 |
* >0 seconds.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
358 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
359 |
* <tr><th scope="row">default</th><td>Object</td><td>ModelMBeanAttributeInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
360 |
* <td>Default value for attribute.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
361 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
362 |
* <tr><th scope="row">descriptorType</th><td>String</td><td>Any</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
363 |
* <td>Type of descriptor, "mbean", "attribute", "constructor", "operation", |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
364 |
* or "notification".</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
365 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
366 |
* <tr id="displayName"><th scope="row">displayName</th><td>String</td><td>Any</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
367 |
* <td>Human readable name of this item.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
368 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
369 |
* <tr><th scope="row">export</th><td>String</td><td>ModelMBeanInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
370 |
* <td>Name to be used to export/expose this MBean so that it is |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
371 |
* findable by other JMX Agents.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
372 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
373 |
* <tr><th scope="row">getMethod</th><td>String</td><td>ModelMBeanAttributeInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
374 |
* <td>Name of operation descriptor for get method.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
375 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
376 |
* <tr><th scope="row">lastUpdatedTimeStamp</th><td>Number</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
377 |
* <td>ModelMBeanAttributeInfo<br>ModelMBeanOperationInfo</td> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
378 |
* <td>When <a href="#value-field">value</a> was set.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
379 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
380 |
* <tr><th scope="row">log</th><td>String</td><td>ModelMBeanInfo<br>ModelMBeanNotificationInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
381 |
* <td>t or T: log all notifications, f or F: log no notifications.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
382 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
383 |
* <tr><th scope="row">logFile</th><td>String</td><td>ModelMBeanInfo<br>ModelMBeanNotificationInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
384 |
* <td>Fully qualified filename to log events to.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
385 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
386 |
* <tr><th scope="row">messageID</th><td>String</td><td>ModelMBeanNotificationInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
387 |
* <td>Unique key for message text (to allow translation, analysis).</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
388 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
389 |
* <tr><th scope="row">messageText</th><td>String</td><td>ModelMBeanNotificationInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
390 |
* <td>Text of notification.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
391 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
392 |
* <tr><th scope="row">name</th><td>String</td><td>Any</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
393 |
* <td>Name of this item.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
394 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
395 |
* <tr><th scope="row">persistFile</th><td>String</td><td>ModelMBeanInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
396 |
* <td>File name into which the MBean should be persisted.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
397 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
398 |
* <tr><th scope="row">persistLocation</th><td>String</td><td>ModelMBeanInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
399 |
* <td>The fully qualified directory name where the MBean should be |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
400 |
* persisted (if appropriate).</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
401 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
402 |
* <tr><th scope="row">persistPeriod</th><td>Number</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
403 |
* <td>ModelMBeanInfo<br>ModelMBeanAttributeInfo</td> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
404 |
* <td>Frequency of persist cycle in seconds. Used when persistPolicy is |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
405 |
* "OnTimer" or "NoMoreOftenThan".</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
406 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
407 |
* <tr><th scope="row">persistPolicy</th><td>String</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
408 |
* <td>ModelMBeanInfo<br>ModelMBeanAttributeInfo</td> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
409 |
* <td>One of: OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never. |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
410 |
* See the section "MBean Descriptor Fields" in the JMX specification |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
411 |
* document.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
412 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
413 |
* <tr><th scope="row">presentationString</th><td>String</td><td>Any</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
414 |
* <td>XML formatted string to allow presentation of data.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
415 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
416 |
* <tr><th scope="row">protocolMap</th><td>Descriptor</td><td>ModelMBeanAttributeInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
417 |
* <td>See the section "Protocol Map Support" in the JMX specification |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
418 |
* document. Mappings must be appropriate for the attribute and entries |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
419 |
* can be updated or augmented at runtime.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
420 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
421 |
* <tr><th scope="row">role</th><td>String</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
422 |
* <td>ModelMBeanConstructorInfo<br>ModelMBeanOperationInfo</td> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
423 |
* <td>One of "constructor", "operation", "getter", or "setter".</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
424 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
425 |
* <tr><th scope="row">setMethod</th><td>String</td><td>ModelMBeanAttributeInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
426 |
* <td>Name of operation descriptor for set method.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
427 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
428 |
* <tr id="severity"><th scope="row">severity</th><td>Number</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
429 |
* <td>ModelMBeanNotificationInfo</td> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
430 |
* <td>0-6 where 0: unknown; 1: non-recoverable; |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
431 |
* 2: critical, failure; 3: major, severe; |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
432 |
* 4: minor, marginal, error; 5: warning; |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
433 |
* 6: normal, cleared, informative</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
434 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
435 |
* <tr><th scope="row">targetObject</th><td>Object</td><td>ModelMBeanOperationInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
436 |
* <td>Object on which to execute this method.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
437 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
438 |
* <tr><th scope="row">targetType</th><td>String</td><td>ModelMBeanOperationInfo</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
439 |
* <td>type of object reference for targetObject. Can be: |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
440 |
* ObjectReference | Handle | EJBHandle | IOR | RMIReference.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
441 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
442 |
* <tr id="value-field"><th scope="row">value</th><td>Object</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
443 |
* <td>ModelMBeanAttributeInfo<br>ModelMBeanOperationInfo</td> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
444 |
* <td>Current (cached) value for attribute or operation.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
445 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
446 |
* <tr id="visibility"><th scope="row">visibility</th><td>Number</td><td>Any</td> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
447 |
* <td>1-4 where 1: always visible, 4: rarely visible.</td></tr> |
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
448 |
* |
47028
6df65183aa1f
8186932: Fix accessibility issues in the java.management module
jjg
parents:
45130
diff
changeset
|
449 |
* </tbody> |
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
450 |
* </table> |
2 | 451 |
* |
452 |
* @since 1.5 |
|
453 |
*/ |
|
454 |
public interface Descriptor extends Serializable, Cloneable |
|
455 |
{ |
|
456 |
||
457 |
/** |
|
458 |
* Returns the value for a specific field name, or null if no value |
|
459 |
* is present for that name. |
|
460 |
* |
|
461 |
* @param fieldName the field name. |
|
462 |
* |
|
463 |
* @return the corresponding value, or null if the field is not present. |
|
464 |
* |
|
465 |
* @exception RuntimeOperationsException if the field name is illegal. |
|
466 |
*/ |
|
467 |
public Object getFieldValue(String fieldName) |
|
468 |
throws RuntimeOperationsException; |
|
469 |
||
470 |
/** |
|
471 |
* <p>Sets the value for a specific field name. This will |
|
472 |
* modify an existing field or add a new field.</p> |
|
473 |
* |
|
474 |
* <p>The field value will be validated before it is set. |
|
475 |
* If it is not valid, then an exception will be thrown. |
|
476 |
* The meaning of validity is dependent on the descriptor |
|
477 |
* implementation.</p> |
|
478 |
* |
|
479 |
* @param fieldName The field name to be set. Cannot be null or empty. |
|
480 |
* @param fieldValue The field value to be set for the field |
|
481 |
* name. Can be null if that is a valid value for the field. |
|
482 |
* |
|
483 |
* @exception RuntimeOperationsException if the field name or field value |
|
484 |
* is illegal (wrapped exception is {@link IllegalArgumentException}); or |
|
485 |
* if the descriptor is immutable (wrapped exception is |
|
486 |
* {@link UnsupportedOperationException}). |
|
487 |
*/ |
|
488 |
public void setField(String fieldName, Object fieldValue) |
|
489 |
throws RuntimeOperationsException; |
|
490 |
||
491 |
||
492 |
/** |
|
493 |
* Returns all of the fields contained in this descriptor as a string array. |
|
494 |
* |
|
495 |
* @return String array of fields in the format <i>fieldName=fieldValue</i> |
|
496 |
* <br>If the value of a field is not a String, then the toString() method |
|
497 |
* will be called on it and the returned value, enclosed in parentheses, |
|
498 |
* used as the value for the field in the returned array. If the value |
|
499 |
* of a field is null, then the value of the field in the returned array |
|
500 |
* will be empty. If the descriptor is empty, you will get |
|
501 |
* an empty array. |
|
502 |
* |
|
503 |
* @see #setFields |
|
504 |
*/ |
|
505 |
public String[] getFields(); |
|
506 |
||
507 |
||
508 |
/** |
|
509 |
* Returns all the field names in the descriptor. |
|
510 |
* |
|
511 |
* @return String array of field names. If the descriptor is empty, |
|
512 |
* you will get an empty array. |
|
513 |
*/ |
|
514 |
public String[] getFieldNames(); |
|
515 |
||
516 |
/** |
|
517 |
* Returns all the field values in the descriptor as an array of Objects. The |
|
518 |
* returned values are in the same order as the {@code fieldNames} String array parameter. |
|
519 |
* |
|
520 |
* @param fieldNames String array of the names of the fields that |
|
521 |
* the values should be returned for. If the array is empty then |
|
522 |
* an empty array will be returned. If the array is null then all |
|
523 |
* values will be returned, as if the parameter were the array |
|
524 |
* returned by {@link #getFieldNames()}. If a field name in the |
|
525 |
* array does not exist, including the case where it is null or |
|
526 |
* the empty string, then null is returned for the matching array |
|
527 |
* element being returned. |
|
528 |
* |
|
529 |
* @return Object array of field values. If the list of {@code fieldNames} |
|
530 |
* is empty, you will get an empty array. |
|
531 |
*/ |
|
532 |
public Object[] getFieldValues(String... fieldNames); |
|
533 |
||
534 |
/** |
|
535 |
* Removes a field from the descriptor. |
|
536 |
* |
|
537 |
* @param fieldName String name of the field to be removed. |
|
538 |
* If the field name is illegal or the field is not found, |
|
539 |
* no exception is thrown. |
|
540 |
* |
|
541 |
* @exception RuntimeOperationsException if a field of the given name |
|
542 |
* exists and the descriptor is immutable. The wrapped exception will |
|
543 |
* be an {@link UnsupportedOperationException}. |
|
544 |
*/ |
|
545 |
public void removeField(String fieldName); |
|
546 |
||
547 |
/** |
|
548 |
* <p>Sets all fields in the field names array to the new value with |
|
549 |
* the same index in the field values array. Array sizes must match.</p> |
|
550 |
* |
|
551 |
* <p>The field value will be validated before it is set. |
|
552 |
* If it is not valid, then an exception will be thrown. |
|
553 |
* If the arrays are empty, then no change will take effect.</p> |
|
554 |
* |
|
555 |
* @param fieldNames String array of field names. The array and array |
|
556 |
* elements cannot be null. |
|
557 |
* @param fieldValues Object array of the corresponding field values. |
|
558 |
* The array cannot be null. Elements of the array can be null. |
|
559 |
* |
|
560 |
* @throws RuntimeOperationsException if the change fails for any reason. |
|
561 |
* Wrapped exception is {@link IllegalArgumentException} if |
|
562 |
* {@code fieldNames} or {@code fieldValues} is null, or if |
|
563 |
* the arrays are of different lengths, or if there is an |
|
564 |
* illegal value in one of them. |
|
565 |
* Wrapped exception is {@link UnsupportedOperationException} |
|
566 |
* if the descriptor is immutable, and the call would change |
|
567 |
* its contents. |
|
568 |
* |
|
569 |
* @see #getFields |
|
570 |
*/ |
|
571 |
public void setFields(String[] fieldNames, Object[] fieldValues) |
|
572 |
throws RuntimeOperationsException; |
|
573 |
||
574 |
||
575 |
/** |
|
576 |
* <p>Returns a descriptor which is equal to this descriptor. |
|
577 |
* Changes to the returned descriptor will have no effect on this |
|
578 |
* descriptor, and vice versa. If this descriptor is immutable, |
|
579 |
* it may fulfill this condition by returning itself.</p> |
|
580 |
* @exception RuntimeOperationsException for illegal value for field names |
|
581 |
* or field values. |
|
582 |
* If the descriptor construction fails for any reason, this exception will |
|
583 |
* be thrown. |
|
584 |
* @return A descriptor which is equal to this descriptor. |
|
585 |
*/ |
|
586 |
public Object clone() throws RuntimeOperationsException; |
|
587 |
||
588 |
||
589 |
/** |
|
590 |
* Returns true if all of the fields have legal values given their |
|
591 |
* names. |
|
592 |
* |
|
593 |
* @return true if the values are legal. |
|
594 |
* |
|
595 |
* @exception RuntimeOperationsException If the validity checking fails for |
|
596 |
* any reason, this exception will be thrown. |
|
597 |
* The method returns false if the descriptor is not valid, but throws |
|
598 |
* this exception if the attempt to determine validity fails. |
|
599 |
*/ |
|
600 |
public boolean isValid() throws RuntimeOperationsException; |
|
601 |
||
602 |
/** |
|
1513
d09513aaa9da
6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents:
1247
diff
changeset
|
603 |
* <p>Compares this descriptor to the given object. The objects are equal if |
2 | 604 |
* the given object is also a Descriptor, and if the two Descriptors have |
605 |
* the same field names (possibly differing in case) and the same |
|
606 |
* associated values. The respective values for a field in the two |
|
607 |
* Descriptors are equal if the following conditions hold:</p> |
|
608 |
* |
|
609 |
* <ul> |
|
610 |
* <li>If one value is null then the other must be too.</li> |
|
611 |
* <li>If one value is a primitive array then the other must be a primitive |
|
612 |
* array of the same type with the same elements.</li> |
|
613 |
* <li>If one value is an object array then the other must be too and |
|
614 |
* {@link Arrays#deepEquals(Object[],Object[])} must return true.</li> |
|
615 |
* <li>Otherwise {@link Object#equals(Object)} must return true.</li> |
|
616 |
* </ul> |
|
617 |
* |
|
618 |
* @param obj the object to compare with. |
|
619 |
* |
|
620 |
* @return {@code true} if the objects are the same; {@code false} |
|
621 |
* otherwise. |
|
622 |
* |
|
623 |
* @since 1.6 |
|
624 |
*/ |
|
625 |
public boolean equals(Object obj); |
|
626 |
||
627 |
/** |
|
628 |
* <p>Returns the hash code value for this descriptor. The hash |
|
629 |
* code is computed as the sum of the hash codes for each field in |
|
630 |
* the descriptor. The hash code of a field with name {@code n} |
|
631 |
* and value {@code v} is {@code n.toLowerCase().hashCode() ^ h}. |
|
632 |
* Here {@code h} is the hash code of {@code v}, computed as |
|
633 |
* follows:</p> |
|
634 |
* |
|
635 |
* <ul> |
|
636 |
* <li>If {@code v} is null then {@code h} is 0.</li> |
|
637 |
* <li>If {@code v} is a primitive array then {@code h} is computed using |
|
638 |
* the appropriate overloading of {@code java.util.Arrays.hashCode}.</li> |
|
639 |
* <li>If {@code v} is an object array then {@code h} is computed using |
|
640 |
* {@link Arrays#deepHashCode(Object[])}.</li> |
|
641 |
* <li>Otherwise {@code h} is {@code v.hashCode()}.</li> |
|
642 |
* </ul> |
|
643 |
* |
|
644 |
* @return A hash code value for this object. |
|
645 |
* |
|
646 |
* @since 1.6 |
|
647 |
*/ |
|
648 |
public int hashCode(); |
|
649 |
} |