src/java.management/share/classes/javax/management/Descriptor.java
author darcy
Wed, 23 Oct 2019 13:01:40 -0700
changeset 58766 54ffb15c4839
parent 47216 71c04702a3d5
permissions -rw-r--r--
8232442: Suppress warnings on non-serializable non-transient instance fields in java.management.* Reviewed-by: rriggs, mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     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
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * @author    IBM Corp.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * Copyright IBM Corp. 1999-2000.  All rights reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
package javax.management;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import java.io.Serializable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
// Javadoc imports:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import java.lang.management.MemoryUsage;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    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
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import java.util.ResourceBundle;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import javax.management.openmbean.CompositeData;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import javax.management.openmbean.OpenMBeanAttributeInfoSupport;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
import javax.management.openmbean.OpenMBeanOperationInfoSupport;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
import javax.management.openmbean.OpenMBeanParameterInfoSupport;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
import javax.management.openmbean.OpenType;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * <p>Additional metadata for a JMX element.  A {@code Descriptor}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * is associated with a {@link MBeanInfo}, {@link MBeanAttributeInfo}, etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * It consists of a collection of fields.  A field is a name and an
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * associated value.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * <p>Field names are not case-sensitive.  The names {@code descriptorType},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * {@code descriptortype}, and {@code DESCRIPTORTYPE} are all equivalent.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * However, the case that was used when the field was first set is preserved
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * in the result of the {@link #getFields} and {@link #getFieldNames}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * methods.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * <p>Not all field names and values are predefined.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * New fields can be defined and added by any program.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * <p>A descriptor can be mutable or immutable.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * An immutable descriptor, once created, never changes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * The <code>Descriptor</code> methods that could modify the contents
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * of the descriptor will throw an exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * for an immutable descriptor.  Immutable descriptors are usually
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * instances of {@link ImmutableDescriptor} or a subclass.  Mutable
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * descriptors are usually instances of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * {@link javax.management.modelmbean.DescriptorSupport} or a subclass.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * <p>Certain fields are used by the JMX implementation.  This means
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 * either that the presence of the field may change the behavior of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * the JMX API or that the field may be set in descriptors returned by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * the JMX API.  These fields appear in <i>italics</i> in the table
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 * below, and each one has a corresponding constant in the {@link JMX}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * class.  For example, the field {@code defaultValue} is represented
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 * by the constant {@link JMX#DEFAULT_VALUE_FIELD}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 * <p>Certain other fields have conventional meanings described in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 * table below but they are not required to be understood or set by
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * the JMX implementation.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 * <p>Field names defined by the JMX specification in this and all
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 * future versions will never contain a period (.).  Users can safely
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 * create their own fields by including a period in the name and be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 * sure that these names will not collide with any future version of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 * the JMX API.  It is recommended to follow the Java package naming
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 * convention to avoid collisions between field names from different
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
 * origins.  For example, a field created by {@code example.com} might
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 * have the name {@code com.example.interestLevel}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
 * <p>Note that the values in the {@code defaultValue}, {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
 * legalValues}, {@code maxValue}, and {@code minValue} fields should
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
 * be consistent with the type returned by the {@code getType()}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
 * method for the associated {@code MBeanAttributeInfo} or {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
 * MBeanParameterInfo}.  For MXBeans, this means that they should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
 * of the mapped Java type, called <em>opendata</em>(J) in the <a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
 * href="MXBean.html#mapping-rules">MXBean type mapping rules</a>.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 * <td>MBeanAttributeInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
 * <td>Default value for an attribute or parameter.  See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
 * {@link javax.management.openmbean}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 * <td>An indication that this element of the information model is no
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 * longer recommended for use.  A set of MBeans defined by an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 * application is collectively called an <em>information model</em>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
 * The convention is for the value of this field to contain a string
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
 * that is the version of the model in which the element was first
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
 * deprecated, followed by a space, followed by an explanation of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
 * deprecation, for example {@code "1.3 Replaced by the Capacity
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 * attribute"}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
 * <td>The base name for the {@link ResourceBundle} in which the key given in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
 * the {@code descriptionResourceKey} field can be found, for example
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   131
 * {@code "com.example.myapp.MBeanResources"}.  The meaning of this
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   132
 * field is defined by this specification but the field is not set or
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   133
 * used by the JMX API itself.</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
 * <td>A resource key for the description of this element.  In
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   141
 * The meaning of this field is defined by this specification but the
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   142
 * field is not set or used by the JMX API itself.</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
 * <td>MBeanAttributeInfo<br>MBeanNotificationInfo<br>MBeanOperationInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
 * <td>The string {@code "true"} or {@code "false"} according as this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
 * item is enabled.  When an attribute or operation is not enabled, it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
 * exists but cannot currently be accessed.  A user interface might
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
 * present it as a greyed-out item.  For example, an attribute might
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
 * only be meaningful after the {@code start()} method of an MBean has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
 * been called, and is otherwise disabled.  Likewise, a notification
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
 * might be disabled if it cannot currently be emitted but could be in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
 * other circumstances.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   160
 * constructor or operation, or getting an attribute. The meaning of this field
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   161
 * is defined by this specification but the field is not set or used by the
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
 * <td>MBeanInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
 * <td>The string {@code "true"} or {@code "false"} according as this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
 * MBean's MBeanInfo is <em>immutable</em>.  When this field is true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
 * the MBeanInfo for the given MBean is guaranteed not to change over
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
 * the lifetime of the MBean.  Hence, a client can read it once and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
 * cache the read value.  When this field is false or absent, there is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
 * MBean that does not define {@code immutableInfo} as {@code true}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
 * that the MBeanInfo is not likely to change within this period and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
 * therefore can be cached.  When this field is missing or has the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
 * <td>String</td><td>MBeanInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
 * <td>The Java interface name for a Standard MBean or MXBean, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
 * returned by {@link Class#getName()}.  A Standard MBean or MXBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
 * registered directly in the MBean Server or created using the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
 * StandardMBean} class will have this field in its MBeanInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
 * Descriptor.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
 * <td>{@literal Set<?>}</td><td>MBeanAttributeInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
 * <td>Legal values for an attribute or parameter.  See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
 * {@link javax.management.openmbean}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
 * <td>MBeanAttributeInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
 * <td>Maximum legal value for an attribute or parameter.  See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
 * {@link javax.management.openmbean}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
 * <td>MBeanAttributeInfo<br>MBeanOperationInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
 * <td>The type of a metric, one of the strings "counter" or "gauge".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
 * A metric is a measurement exported by an MBean, usually an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
 * attribute but sometimes the result of an operation.  A metric that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
 * is a <em>counter</em> has a value that never decreases except by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
 * being reset to a starting value.  Counter metrics are almost always
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
 * non-negative integers.  An example might be the number of requests
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
 * received.  A metric that is a <em>gauge</em> has a numeric value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
 * that can increase or decrease.  Examples might be the number of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
 * open connections or a cache hit rate or a temperature reading.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
 * <td>MBeanAttributeInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
 * <td>Minimum legal value for an attribute or parameter.  See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
 * {@link javax.management.openmbean}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
 * <td>MBeanInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
 * <td>The string {@code "true"} or {@code "false"} according as this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
 * MBean is an {@link MXBean}.  A Standard MBean or MXBean registered
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
 * directly with the MBean Server or created using the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
 * StandardMBean} class will have this field in its MBeanInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
 * Descriptor.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
 * <td>MBeanAttributeInfo<br>MBeanOperationInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
 * <td><p>The Open Type of this element.  In the case of {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
 * MBeanAttributeInfo} and {@code MBeanParameterInfo}, this is the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
 * Open Type of the attribute or parameter.  In the case of {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
 * MBeanOperationInfo}, it is the Open Type of the return value.  This
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
 * field is set in the Descriptor for all instances of {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
 * OpenMBeanAttributeInfoSupport}, {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
 * OpenMBeanOperationInfoSupport}, and {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
 * OpenMBeanParameterInfoSupport}.  It is also set for attributes,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
 * operations, and parameters of MXBeans.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
 * <p>This field can be set for an {@code MBeanNotificationInfo}, in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
 * which case it indicates the Open Type that the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
 * Notification#getUserData() user data} will have.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
 * <td>MBeanAttributeInfo<br>MBeanOperationInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
 * <td><p>The original Java type of this element as it appeared in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
 * {@link MXBean} interface method that produced this {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
 * MBeanAttributeInfo} (etc).  For example, a method<br> <code>public
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
 * </code> {@link MemoryUsage}<code> getHeapMemoryUsage();</code><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
 * in an MXBean interface defines an attribute called {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
 * HeapMemoryUsage} of type {@link CompositeData}.  The {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
 * originalType} field in the Descriptor for this attribute will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
 * the value {@code "java.lang.management.MemoryUsage"}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
 * <p>The format of this string is described in the section <a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
 * href="MXBean.html#type-names">Type Names</a> of the MXBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
 * specification.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   285
 * an attribute. The meaning of this field
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   286
 * is defined by this specification but the field is not set or used by the
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
 * <td>MBeanNotificationInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
 * <td>The severity of this notification.  It can be 0 to mean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
 * unknown severity or a value from 1 to 6 representing decreasing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
 * levels of severity.  It can be represented as a decimal string or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
 * an {@code Integer}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
 * <td>The version of the information model in which this element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
 * was introduced.  A set of MBeans defined by an application is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
 * collectively called an <em>information model</em>.  The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
 * application may also define versions of this model, and use the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
 * {@code "since"} field to record the version in which an element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
 * first appeared.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
 * <td>MBeanAttributeInfo<br>MBeanParameterInfo<br>MBeanOperationInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
 * <td>The units in which an attribute, parameter, or operation return
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
 * value is measured, for example {@code "bytes"} or {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
 * "seconds"}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
 *
47028
6df65183aa1f 8186932: Fix accessibility issues in the java.management module
jjg
parents: 45130
diff changeset
   314
 * </tbody>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
 * </table>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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: &lt;0 never, =0 always,
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   357
 *         &gt;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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
public interface Descriptor extends Serializable, Cloneable
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
     * Returns the value for a specific field name, or null if no value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
     * is present for that name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
     * @param fieldName the field name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
     * @return the corresponding value, or null if the field is not present.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
     * @exception RuntimeOperationsException if the field name is illegal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
    public Object getFieldValue(String fieldName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
            throws RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
     * <p>Sets the value for a specific field name. This will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
     * modify an existing field or add a new field.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
     * <p>The field value will be validated before it is set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
     * If it is not valid, then an exception will be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
     * The meaning of validity is dependent on the descriptor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
     * implementation.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
     * @param fieldName The field name to be set. Cannot be null or empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
     * @param fieldValue The field value to be set for the field
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
     * name. Can be null if that is a valid value for the field.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
     * @exception RuntimeOperationsException if the field name or field value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
     * is illegal (wrapped exception is {@link IllegalArgumentException}); or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
     * if the descriptor is immutable (wrapped exception is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
     * {@link UnsupportedOperationException}).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
    public void setField(String fieldName, Object fieldValue)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
        throws RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
     * Returns all of the fields contained in this descriptor as a string array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
     * @return String array of fields in the format <i>fieldName=fieldValue</i>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
     * <br>If the value of a field is not a String, then the toString() method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
     * will be called on it and the returned value, enclosed in parentheses,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
     * used as the value for the field in the returned array. If the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
     * of a field is null, then the value of the field in the returned array
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
     * will be empty.  If the descriptor is empty, you will get
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
     * an empty array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
     * @see #setFields
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
    public String[] getFields();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
     * Returns all the field names in the descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
     * @return String array of field names. If the descriptor is empty,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
     * you will get an empty array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
    public String[] getFieldNames();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
     * Returns all the field values in the descriptor as an array of Objects. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
     * returned values are in the same order as the {@code fieldNames} String array parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
     * @param fieldNames String array of the names of the fields that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
     * the values should be returned for.  If the array is empty then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
     * an empty array will be returned.  If the array is null then all
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
     * values will be returned, as if the parameter were the array
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
     * returned by {@link #getFieldNames()}.  If a field name in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
     * array does not exist, including the case where it is null or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
     * the empty string, then null is returned for the matching array
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
     * element being returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
     * @return Object array of field values. If the list of {@code fieldNames}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
     * is empty, you will get an empty array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
    public Object[] getFieldValues(String... fieldNames);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
     * Removes a field from the descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
     * @param fieldName String name of the field to be removed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
     * If the field name is illegal or the field is not found,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
     * no exception is thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
     * @exception RuntimeOperationsException if a field of the given name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
     * exists and the descriptor is immutable.  The wrapped exception will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
     * be an {@link UnsupportedOperationException}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
    public void removeField(String fieldName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
     * <p>Sets all fields in the field names array to the new value with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
     * the same index in the field values array. Array sizes must match.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
     * <p>The field value will be validated before it is set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
     * If it is not valid, then an exception will be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
     * If the arrays are empty, then no change will take effect.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
     * @param fieldNames String array of field names. The array and array
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
     * elements cannot be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
     * @param fieldValues Object array of the corresponding field values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
     * The array cannot be null. Elements of the array can be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
     * @throws RuntimeOperationsException if the change fails for any reason.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
     * Wrapped exception is {@link IllegalArgumentException} if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
     * {@code fieldNames} or {@code fieldValues} is null, or if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
     * the arrays are of different lengths, or if there is an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
     * illegal value in one of them.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
     * Wrapped exception is {@link UnsupportedOperationException}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
     * if the descriptor is immutable, and the call would change
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
     * its contents.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
     * @see #getFields
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
    public void setFields(String[] fieldNames, Object[] fieldValues)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
        throws RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
     * <p>Returns a descriptor which is equal to this descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
     * Changes to the returned descriptor will have no effect on this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
     * descriptor, and vice versa.  If this descriptor is immutable,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
     * it may fulfill this condition by returning itself.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
     * @exception RuntimeOperationsException for illegal value for field names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
     * or field values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
     * If the descriptor construction fails for any reason, this exception will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
     * be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
     * @return A descriptor which is equal to this descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
    public Object clone() throws RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
     * Returns true if all of the fields have legal values given their
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
     * names.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
     * @return true if the values are legal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
     * @exception RuntimeOperationsException If the validity checking fails for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
     * any reason, this exception will be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
     * The method returns false if the descriptor is not valid, but throws
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
     * this exception if the attempt to determine validity fails.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
    public boolean isValid() throws RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
90ce3da70b43 Initial load
duke
parents:
diff changeset
   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
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
     * the given object is also a Descriptor, and if the two Descriptors have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
     * the same field names (possibly differing in case) and the same
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
     * associated values.  The respective values for a field in the two
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
     * Descriptors are equal if the following conditions hold:</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
     * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
     * <li>If one value is null then the other must be too.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
     * <li>If one value is a primitive array then the other must be a primitive
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
     * array of the same type with the same elements.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
     * <li>If one value is an object array then the other must be too and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
     * {@link Arrays#deepEquals(Object[],Object[])} must return true.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
     * <li>Otherwise {@link Object#equals(Object)} must return true.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
     * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
     * @param obj the object to compare with.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
     * @return {@code true} if the objects are the same; {@code false}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
     * otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
    public boolean equals(Object obj);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
     * <p>Returns the hash code value for this descriptor.  The hash
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
     * code is computed as the sum of the hash codes for each field in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
     * the descriptor.  The hash code of a field with name {@code n}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
     * and value {@code v} is {@code n.toLowerCase().hashCode() ^ h}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
     * Here {@code h} is the hash code of {@code v}, computed as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
     * follows:</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
     * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
     * <li>If {@code v} is null then {@code h} is 0.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
     * <li>If {@code v} is a primitive array then {@code h} is computed using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
     * the appropriate overloading of {@code java.util.Arrays.hashCode}.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
     * <li>If {@code v} is an object array then {@code h} is computed using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
     * {@link Arrays#deepHashCode(Object[])}.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
     * <li>Otherwise {@code h} is {@code v.hashCode()}.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
     * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
     * @return A hash code value for this object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
    public int hashCode();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
}