jdk/src/share/classes/javax/management/Descriptor.java
author rriggs
Tue, 12 Nov 2013 14:03:28 -0500
changeset 21656 d4c777ccb1db
parent 20455 f6f9a0c2796b
child 23010 6dadb192ad81
permissions -rw-r--r--
8028014: Doclint warning/error cleanup in javax.management Summary: Improve generated html by fixing doclint warnings Reviewed-by: sla, jbachorik
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     2
 * Copyright (c) 2000, 2008, 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
 *
21656
d4c777ccb1db 8028014: Doclint warning/error cleanup in javax.management
rriggs
parents: 20455
diff changeset
    99
 * <table border="1" cellpadding="5" summary="Descriptor Fields">
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
 * <tr><th>Name</th><th>Type</th><th>Used in</th><th>Meaning</th></tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   103
 * <tr id="defaultValue"><td><i>defaultValue</i><td>Object</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
 * <td>MBeanAttributeInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
 * <td>Default value for an attribute or parameter.  See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
 * {@link javax.management.openmbean}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
 * <tr><td>deprecated</td><td>String</td><td>Any</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
 * <td>An indication that this element of the information model is no
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
 * longer recommended for use.  A set of MBeans defined by an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
 * application is collectively called an <em>information model</em>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
 * The convention is for the value of this field to contain a string
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
 * that is the version of the model in which the element was first
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 * deprecated, followed by a space, followed by an explanation of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 * deprecation, for example {@code "1.3 Replaced by the Capacity
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 * attribute"}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 *
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   120
 * <tr><td id="descriptionResourceBundleBaseName">descriptionResource<br>
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   121
 * BundleBaseName</td><td>String</td><td>Any</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
 * <td>The base name for the {@link ResourceBundle} in which the key given in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 * 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
   125
 * {@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
   126
 * 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
   127
 * used by the JMX API itself.</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 *
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   129
 * <tr><td id="descriptionResourceKey">descriptionResourceKey</td>
1570
4165709c91e3 5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents: 1513
diff changeset
   130
 * <td>String</td><td>Any</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
 * <td>A resource key for the description of this element.  In
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
 * 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
   134
 * 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
   135
 * 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
   136
 * field is not set or used by the JMX API itself.</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
 * <tr><td>enabled</td><td>String</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
 * <td>MBeanAttributeInfo<br>MBeanNotificationInfo<br>MBeanOperationInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
 * <td>The string {@code "true"} or {@code "false"} according as this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
 * item is enabled.  When an attribute or operation is not enabled, it
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
 * exists but cannot currently be accessed.  A user interface might
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
 * present it as a greyed-out item.  For example, an attribute might
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
 * only be meaningful after the {@code start()} method of an MBean has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
 * been called, and is otherwise disabled.  Likewise, a notification
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
 * might be disabled if it cannot currently be emitted but could be in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
 * other circumstances.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
 *
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   150
 * <tr id="exceptions"><td>exceptions<td>String[]</td>
1699
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   151
 * <td>MBeanAttributeInfo, MBeanConstructorInfo, MBeanOperationInfo</td>
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   152
 *
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   153
 * <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
   154
 * 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
   155
 * 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
   156
 * JMX API itself. Exceptions thrown when
1699
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   157
 * setting an attribute are specified by the field
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   158
 * <a href="#setExceptions">{@code setExceptions}</a>.
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   159
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   160
 * <tr id="immutableInfo"><td><i>immutableInfo</i><td>String</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
 * <td>MBeanInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
 * <td>The string {@code "true"} or {@code "false"} according as this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
 * MBean's MBeanInfo is <em>immutable</em>.  When this field is true,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
 * the MBeanInfo for the given MBean is guaranteed not to change over
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
 * the lifetime of the MBean.  Hence, a client can read it once and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
 * cache the read value.  When this field is false or absent, there is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
 * 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
   169
 * will necessarily change.  See also the <a
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   170
 * 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
   171
 * notification.</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
 *
1570
4165709c91e3 5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents: 1513
diff changeset
   173
 * <tr id="infoTimeout"><td>infoTimeout</td><td>String<br>Long</td><td>MBeanInfo</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
 *
1570
4165709c91e3 5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents: 1513
diff changeset
   175
 * <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
   176
 * 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
   177
 * decimal string.  This provides a hint from a DynamicMBean or any
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
 * MBean that does not define {@code immutableInfo} as {@code true}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
 * that the MBeanInfo is not likely to change within this period and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
 * therefore can be cached.  When this field is missing or has the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
 * 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
   182
 * 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
   183
 * 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
   184
 * its {@link MBeanNotificationInfo} array.</td></tr>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   186
 * <tr id="interfaceClassName"><td><i>interfaceClassName</i></td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
 * <td>String</td><td>MBeanInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
 * <td>The Java interface name for a Standard MBean or MXBean, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
 * returned by {@link Class#getName()}.  A Standard MBean or MXBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
 * registered directly in the MBean Server or created using the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
 * StandardMBean} class will have this field in its MBeanInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
 * Descriptor.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   195
 * <tr id="legalValues"><td><i>legalValues</i></td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
 * <td>{@literal Set<?>}</td><td>MBeanAttributeInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
 * <td>Legal values for an attribute or parameter.  See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
 * {@link javax.management.openmbean}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
 *
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   201
 * <tr id="locale"><td>locale</td>
1570
4165709c91e3 5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents: 1513
diff changeset
   202
 * <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
   203
 *
4165709c91e3 5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents: 1513
diff changeset
   204
 * <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
   205
 * {@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
   206
 * 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
   207
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   208
 * <tr id="maxValue"><td><i>maxValue</i><td>Object</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
 * <td>MBeanAttributeInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
 * <td>Maximum legal value for an attribute or parameter.  See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
 * {@link javax.management.openmbean}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   214
 * <tr id="metricType"><td>metricType</td><td>String</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
 * <td>MBeanAttributeInfo<br>MBeanOperationInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
 * <td>The type of a metric, one of the strings "counter" or "gauge".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
 * A metric is a measurement exported by an MBean, usually an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
 * attribute but sometimes the result of an operation.  A metric that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
 * is a <em>counter</em> has a value that never decreases except by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
 * being reset to a starting value.  Counter metrics are almost always
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
 * non-negative integers.  An example might be the number of requests
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
 * received.  A metric that is a <em>gauge</em> has a numeric value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
 * that can increase or decrease.  Examples might be the number of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
 * open connections or a cache hit rate or a temperature reading.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   227
 * <tr id="minValue"><td><i>minValue</i><td>Object</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
 * <td>MBeanAttributeInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
 * <td>Minimum legal value for an attribute or parameter.  See
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
 * {@link javax.management.openmbean}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   233
 * <tr id="mxbean"><td><i>mxbean</i><td>String</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
 * <td>MBeanInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
 * <td>The string {@code "true"} or {@code "false"} according as this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
 * MBean is an {@link MXBean}.  A Standard MBean or MXBean registered
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
 * directly with the MBean Server or created using the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
 * StandardMBean} class will have this field in its MBeanInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
 * Descriptor.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   242
 * <tr id="openType"><td><i>openType</i><td>{@link OpenType}</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
 * <td>MBeanAttributeInfo<br>MBeanOperationInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
 * <td><p>The Open Type of this element.  In the case of {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
 * MBeanAttributeInfo} and {@code MBeanParameterInfo}, this is the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
 * Open Type of the attribute or parameter.  In the case of {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
 * MBeanOperationInfo}, it is the Open Type of the return value.  This
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
 * field is set in the Descriptor for all instances of {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
 * OpenMBeanAttributeInfoSupport}, {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
 * OpenMBeanOperationInfoSupport}, and {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
 * OpenMBeanParameterInfoSupport}.  It is also set for attributes,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
 * operations, and parameters of MXBeans.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
 * <p>This field can be set for an {@code MBeanNotificationInfo}, in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
 * which case it indicates the Open Type that the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
 * Notification#getUserData() user data} will have.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   259
 * <tr id="originalType"><td><i>originalType</i><td>String</td>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
 * <td>MBeanAttributeInfo<br>MBeanOperationInfo<br>MBeanParameterInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
 * <td><p>The original Java type of this element as it appeared in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
 * {@link MXBean} interface method that produced this {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
 * MBeanAttributeInfo} (etc).  For example, a method<br> <code>public
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
 * </code> {@link MemoryUsage}<code> getHeapMemoryUsage();</code><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
 * in an MXBean interface defines an attribute called {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
 * HeapMemoryUsage} of type {@link CompositeData}.  The {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
 * originalType} field in the Descriptor for this attribute will have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
 * the value {@code "java.lang.management.MemoryUsage"}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
 * <p>The format of this string is described in the section <a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
 * href="MXBean.html#type-names">Type Names</a> of the MXBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
 * specification.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
 *
1699
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   275
 * <tr id="setExceptions"><td><i>setExceptions</i><td>String[]</td>
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   276
 * <td>MBeanAttributeInfo</td>
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   277
 *
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   278
 * <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
   279
 * an attribute. The meaning of this field
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1712
diff changeset
   280
 * 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
   281
 * JMX API itself.  Exceptions thrown when getting an attribute are specified
1699
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   282
 * by the field <a href="#exceptions">{@code exceptions}</a>.
3611e5fd6da5 6250014: MBeanOperationInfo Descriptor field for exceptions
jfdenise
parents: 1570
diff changeset
   283
 *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
 * <tr><td>severity</td><td>String<br>Integer</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
 * <td>MBeanNotificationInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
 * <td>The severity of this notification.  It can be 0 to mean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
 * unknown severity or a value from 1 to 6 representing decreasing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
 * levels of severity.  It can be represented as a decimal string or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
 * an {@code Integer}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
 * <tr><td>since</td><td>String</td><td>Any</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
 * <td>The version of the information model in which this element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
 * was introduced.  A set of MBeans defined by an application is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
 * collectively called an <em>information model</em>.  The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
 * application may also define versions of this model, and use the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
 * {@code "since"} field to record the version in which an element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
 * first appeared.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
 * <tr><td>units</td><td>String</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
 * <td>MBeanAttributeInfo<br>MBeanParameterInfo<br>MBeanOperationInfo</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
 * <td>The units in which an attribute, parameter, or operation return
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
 * value is measured, for example {@code "bytes"} or {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
 * "seconds"}.</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
 * </table>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
 *
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   310
 * <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
   311
 * information for <a href="modelmbean/ModelMBeanInfo.html#descriptor"><!--
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   312
 * -->{@code ModelMBeanInfo}</a>,
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   313
 * <a href="modelmbean/ModelMBeanAttributeInfo.html#descriptor"><!--
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   314
 * -->{@code ModelMBeanAttributeInfo}</a>,
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   315
 * <a href="modelmbean/ModelMBeanConstructorInfo.html#descriptor"><!--
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   316
 * -->{@code ModelMBeanConstructorInfo}</a>,
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   317
 * <a href="modelmbean/ModelMBeanNotificationInfo.html#descriptor"><!--
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   318
 * -->{@code ModelMBeanNotificationInfo}</a>, and
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   319
 * <a href="modelmbean/ModelMBeanOperationInfo.html#descriptor"><!--
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   320
 * -->{@code ModelMBeanOperationInfo}</a>, as
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   321
 * 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
   322
 * 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
   323
 * Specification</a>.  The following table summarizes these fields.  Note
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   324
 * 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
   325
 * representation of a Long can also be used.</p>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   326
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   327
 * <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
   328
 * 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
   329
 * -->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
   330
 * 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
   331
 * a predefined behavior for these fields.</p>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   332
 *
21656
d4c777ccb1db 8028014: Doclint warning/error cleanup in javax.management
rriggs
parents: 20455
diff changeset
   333
 * <table border="1" cellpadding="5" summary="ModelMBean Fields">
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   334
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   335
 * <tr><th>Name</th><th>Type</th><th>Used in</th><th>Meaning</th></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   336
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   337
 * <tr><td>class</td><td>String</td><td>ModelMBeanOperationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   338
 *     <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
   339
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   340
 * <tr><td>currencyTimeLimit</td><td>Number</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   341
 *     <td>ModelMBeanInfo<br>ModelMBeanAttributeInfo<br>ModelMBeanOperationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   342
 *     <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
   343
 *         &gt;0 seconds.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   344
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   345
 * <tr><td>default</td><td>Object</td><td>ModelMBeanAttributeInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   346
 *     <td>Default value for attribute.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   347
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   348
 * <tr><td>descriptorType</td><td>String</td><td>Any</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   349
 *     <td>Type of descriptor, "mbean", "attribute", "constructor", "operation",
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   350
 *         or "notification".</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   351
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   352
 * <tr id="displayName"><td>displayName</td><td>String</td><td>Any</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   353
 *     <td>Human readable name of this item.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   354
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   355
 * <tr><td>export</td><td>String</td><td>ModelMBeanInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   356
 *     <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
   357
 *         findable by other JMX Agents.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   358
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   359
 * <tr><td>getMethod</td><td>String</td><td>ModelMBeanAttributeInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   360
 *     <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
   361
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   362
 * <tr><td>lastUpdatedTimeStamp</td><td>Number</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   363
 *     <td>ModelMBeanAttributeInfo<br>ModelMBeanOperationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   364
 *     <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
   365
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   366
 * <tr><td>log</td><td>String</td><td>ModelMBeanInfo<br>ModelMBeanNotificationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   367
 *     <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
   368
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   369
 * <tr><td>logFile</td><td>String</td><td>ModelMBeanInfo<br>ModelMBeanNotificationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   370
 *     <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
   371
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   372
 * <tr><td>messageID</td><td>String</td><td>ModelMBeanNotificationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   373
 *     <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
   374
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   375
 * <tr><td>messageText</td><td>String</td><td>ModelMBeanNotificationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   376
 *     <td>Text of notification.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   377
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   378
 * <tr><td>name</td><td>String</td><td>Any</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   379
 *     <td>Name of this item.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   380
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   381
 * <tr><td>persistFile</td><td>String</td><td>ModelMBeanInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   382
 *     <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
   383
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   384
 * <tr><td>persistLocation</td><td>String</td><td>ModelMBeanInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   385
 *     <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
   386
 *         persisted (if appropriate).</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   387
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   388
 * <tr><td>persistPeriod</td><td>Number</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   389
 *     <td>ModelMBeanInfo<br>ModelMBeanAttributeInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   390
 *     <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
   391
 *         "OnTimer" or "NoMoreOftenThan".</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   392
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   393
 * <tr><td>persistPolicy</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   394
 *     <td>ModelMBeanInfo<br>ModelMBeanAttributeInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   395
 *     <td>One of: OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never.
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   396
 *         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
   397
 *         document.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   398
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   399
 * <tr><td>presentationString</td><td>String</td><td>Any</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   400
 *     <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
   401
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   402
 * <tr><td>protocolMap</td><td>Descriptor</td><td>ModelMBeanAttributeInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   403
 *     <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
   404
 *         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
   405
 *         can be updated or augmented at runtime.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   406
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   407
 * <tr><td>role</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   408
 *     <td>ModelMBeanConstructorInfo<br>ModelMBeanOperationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   409
 *     <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
   410
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   411
 * <tr><td>setMethod</td><td>String</td><td>ModelMBeanAttributeInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   412
 *     <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
   413
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   414
 * <tr id="severity"><td>severity</td><td>Number</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   415
 *     <td>ModelMBeanNotificationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   416
 *     <td>0-6 where 0: unknown; 1: non-recoverable;
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   417
 *         2: critical, failure; 3: major, severe;
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   418
 *         4: minor, marginal, error; 5: warning;
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   419
 *         6: normal, cleared, informative</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   420
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   421
 * <tr><td>targetObject</td><td>Object</td><td>ModelMBeanOperationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   422
 *     <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
   423
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   424
 * <tr><td>targetType</td><td>String</td><td>ModelMBeanOperationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   425
 *     <td>type of object reference for targetObject. Can be:
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   426
 *         ObjectReference | Handle | EJBHandle | IOR | RMIReference.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   427
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   428
 * <tr id="value-field"><td>value</td><td>Object</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   429
 *     <td>ModelMBeanAttributeInfo<br>ModelMBeanOperationInfo</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   430
 *     <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
   431
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   432
 * <tr id="visibility"><td>visibility</td><td>Number</td><td>Any</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   433
 *     <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
   434
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   435
 * </table>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
public interface Descriptor extends Serializable, Cloneable
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
     * Returns the value for a specific field name, or null if no value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
     * is present for that name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
     * @param fieldName the field name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
     * @return the corresponding value, or null if the field is not present.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
     * @exception RuntimeOperationsException if the field name is illegal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
    public Object getFieldValue(String fieldName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
            throws RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
     * <p>Sets the value for a specific field name. This will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
     * modify an existing field or add a new field.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
     * <p>The field value will be validated before it is set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
     * If it is not valid, then an exception will be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
     * The meaning of validity is dependent on the descriptor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
     * implementation.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
     * @param fieldName The field name to be set. Cannot be null or empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
     * @param fieldValue The field value to be set for the field
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
     * name. Can be null if that is a valid value for the field.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
     * @exception RuntimeOperationsException if the field name or field value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
     * is illegal (wrapped exception is {@link IllegalArgumentException}); or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
     * if the descriptor is immutable (wrapped exception is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
     * {@link UnsupportedOperationException}).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
    public void setField(String fieldName, Object fieldValue)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
        throws RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
     * Returns all of the fields contained in this descriptor as a string array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
     * @return String array of fields in the format <i>fieldName=fieldValue</i>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
     * <br>If the value of a field is not a String, then the toString() method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
     * will be called on it and the returned value, enclosed in parentheses,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
     * used as the value for the field in the returned array. If the value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
     * of a field is null, then the value of the field in the returned array
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
     * will be empty.  If the descriptor is empty, you will get
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
     * an empty array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
     * @see #setFields
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
    public String[] getFields();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
     * Returns all the field names in the descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
     * @return String array of field names. If the descriptor is empty,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
     * you will get an empty array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
    public String[] getFieldNames();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
     * Returns all the field values in the descriptor as an array of Objects. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
     * returned values are in the same order as the {@code fieldNames} String array parameter.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
     * @param fieldNames String array of the names of the fields that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
     * the values should be returned for.  If the array is empty then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
     * an empty array will be returned.  If the array is null then all
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
     * values will be returned, as if the parameter were the array
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
     * returned by {@link #getFieldNames()}.  If a field name in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
     * array does not exist, including the case where it is null or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
     * the empty string, then null is returned for the matching array
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
     * element being returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
     * @return Object array of field values. If the list of {@code fieldNames}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
     * is empty, you will get an empty array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
    public Object[] getFieldValues(String... fieldNames);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
     * Removes a field from the descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
     * @param fieldName String name of the field to be removed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
     * If the field name is illegal or the field is not found,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
     * no exception is thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
     * @exception RuntimeOperationsException if a field of the given name
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
     * exists and the descriptor is immutable.  The wrapped exception will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
     * be an {@link UnsupportedOperationException}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
    public void removeField(String fieldName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
     * <p>Sets all fields in the field names array to the new value with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
     * the same index in the field values array. Array sizes must match.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
     * <p>The field value will be validated before it is set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
     * If it is not valid, then an exception will be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
     * If the arrays are empty, then no change will take effect.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
     * @param fieldNames String array of field names. The array and array
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
     * elements cannot be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
     * @param fieldValues Object array of the corresponding field values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
     * The array cannot be null. Elements of the array can be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
     * @throws RuntimeOperationsException if the change fails for any reason.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
     * Wrapped exception is {@link IllegalArgumentException} if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
     * {@code fieldNames} or {@code fieldValues} is null, or if
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
     * the arrays are of different lengths, or if there is an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
     * illegal value in one of them.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
     * Wrapped exception is {@link UnsupportedOperationException}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
     * if the descriptor is immutable, and the call would change
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
     * its contents.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
     * @see #getFields
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
    public void setFields(String[] fieldNames, Object[] fieldValues)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
        throws RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
     * <p>Returns a descriptor which is equal to this descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
     * Changes to the returned descriptor will have no effect on this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
     * descriptor, and vice versa.  If this descriptor is immutable,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
     * it may fulfill this condition by returning itself.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
     * @exception RuntimeOperationsException for illegal value for field names
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
     * or field values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
     * If the descriptor construction fails for any reason, this exception will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
     * be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
     * @return A descriptor which is equal to this descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
    public Object clone() throws RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
     * Returns true if all of the fields have legal values given their
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
     * names.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
     * @return true if the values are legal.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
     * @exception RuntimeOperationsException If the validity checking fails for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
     * any reason, this exception will be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
     * The method returns false if the descriptor is not valid, but throws
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
     * this exception if the attempt to determine validity fails.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
    public boolean isValid() throws RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
    /**
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1247
diff changeset
   588
     * <p>Compares this descriptor to the given object.  The objects are equal if
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
     * the given object is also a Descriptor, and if the two Descriptors have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
     * the same field names (possibly differing in case) and the same
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
     * associated values.  The respective values for a field in the two
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
     * Descriptors are equal if the following conditions hold:</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
     * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
     * <li>If one value is null then the other must be too.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
     * <li>If one value is a primitive array then the other must be a primitive
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
     * array of the same type with the same elements.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
     * <li>If one value is an object array then the other must be too and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
     * {@link Arrays#deepEquals(Object[],Object[])} must return true.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
     * <li>Otherwise {@link Object#equals(Object)} must return true.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
     * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
     * @param obj the object to compare with.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
     * @return {@code true} if the objects are the same; {@code false}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
     * otherwise.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
    public boolean equals(Object obj);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
     * <p>Returns the hash code value for this descriptor.  The hash
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
     * code is computed as the sum of the hash codes for each field in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
     * the descriptor.  The hash code of a field with name {@code n}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
     * and value {@code v} is {@code n.toLowerCase().hashCode() ^ h}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
     * Here {@code h} is the hash code of {@code v}, computed as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
     * follows:</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
     * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
     * <li>If {@code v} is null then {@code h} is 0.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
     * <li>If {@code v} is a primitive array then {@code h} is computed using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
     * the appropriate overloading of {@code java.util.Arrays.hashCode}.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
     * <li>If {@code v} is an object array then {@code h} is computed using
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
     * {@link Arrays#deepHashCode(Object[])}.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
     * <li>Otherwise {@code h} is {@code v.hashCode()}.</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
     * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
     * @return A hash code value for this object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
     * @since 1.6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
    public int hashCode();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
}