jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanInfo.java
author darcy
Thu, 16 Apr 2015 09:51:29 -0700
changeset 29927 9cc3e111a1d8
parent 25859 3317bb8137f4
child 44858 7183899b064b
permissions -rw-r--r--
8077923: Add missing doclint in javax.management Reviewed-by: dfuchs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
29927
9cc3e111a1d8 8077923: Add missing doclint in javax.management
darcy
parents: 25859
diff changeset
     2
 * Copyright (c) 2000, 2015, 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: 1639
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: 1639
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: 1639
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1639
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1639
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.modelmbean;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import javax.management.Descriptor;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import javax.management.MBeanAttributeInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import javax.management.MBeanConstructorInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import javax.management.RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
import javax.management.MBeanException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import javax.management.MBeanNotificationInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import javax.management.MBeanOperationInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * This interface is implemented by the ModelMBeanInfo for every ModelMBean. An implementation of this interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * must be shipped with every JMX Agent.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * Java resources wishing to be manageable instantiate the ModelMBean using the MBeanServer's
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * createMBean method.  The resource then sets the ModelMBeanInfo and Descriptors for the ModelMBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * instance. The attributes, operations, and notifications exposed via the ModelMBeanInfo for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * ModelMBean comprise the management interface and are accessible
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * from MBeans, connectors/adaptors like other MBeans. Through the Descriptors, values and methods in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * the managed application can be defined and mapped to attributes and operations of the ModelMBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * This mapping can be defined during development in a file or dynamically and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * programmatically at runtime.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * Every ModelMBean which is instantiated in the MBeanServer becomes manageable:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * its attributes, operations, and notifications
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * become remotely accessible through the connectors/adaptors connected to that MBeanServer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * A Java object cannot be registered in the MBeanServer unless it is a JMX compliant MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * By instantiating a ModelMBean, resources are guaranteed that the MBean is valid.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 * MBeanException and RuntimeOperationsException must be thrown on every public method.  This allows
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 *  for wrapping exceptions from distributed communications (RMI, EJB, etc.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
public interface ModelMBeanInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
     * Returns a Descriptor array consisting of all
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
     * Descriptors for the ModelMBeanInfo of type inDescriptorType.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
     * @param inDescriptorType value of descriptorType field that must be set for the descriptor
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
     * to be returned.  Must be "mbean", "attribute", "operation", "constructor" or "notification".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
     * If it is null or empty then all types will be returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
     * @return Descriptor array containing all descriptors for the ModelMBean if type inDescriptorType.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
     * @exception MBeanException Wraps a distributed communication Exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
     * @exception RuntimeOperationsException Wraps an IllegalArgumentException when the descriptorType in parameter is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
     * not one of: "mbean", "attribute", "operation", "constructor", "notification", empty or null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
     * @see #setDescriptors
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    public Descriptor[] getDescriptors(String inDescriptorType)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
            throws MBeanException, RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     * Adds or replaces descriptors in the ModelMBeanInfo.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     * @param inDescriptors The descriptors to be set in the ModelMBeanInfo. Null
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     * elements of the list will be ignored.  All descriptors must have name and descriptorType fields.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     * @exception RuntimeOperationsException Wraps an IllegalArgumentException for a null or invalid descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     * @exception MBeanException Wraps a distributed communication Exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     * @see #getDescriptors
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    public void setDescriptors(Descriptor[] inDescriptors)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
            throws MBeanException, RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     * Returns a Descriptor requested by name and descriptorType.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     * @param inDescriptorName The name of the descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     * @param inDescriptorType The type of the descriptor being
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     * requested.  If this is null or empty then all types are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * searched. Valid types are 'mbean', 'attribute', 'constructor'
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     * 'operation', and 'notification'. This value will be equal to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     * the 'descriptorType' field in the descriptor that is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     * @return Descriptor containing the descriptor for the ModelMBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     * with the same name and descriptorType.  If no descriptor is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     * found, null is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
     * @exception MBeanException Wraps a distributed communication Exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * @exception RuntimeOperationsException Wraps an IllegalArgumentException for a null descriptor name or null or invalid type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     * The type must be "mbean","attribute", "constructor", "operation", or "notification".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     * @see #setDescriptor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    public Descriptor getDescriptor(String inDescriptorName, String inDescriptorType)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
            throws MBeanException, RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     * Sets descriptors in the info array of type inDescriptorType
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     * for the ModelMBean.  The setDescriptor method of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     * corresponding ModelMBean*Info will be called to set the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     * specified descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     * @param inDescriptor The descriptor to be set in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
     * ModelMBean. It must NOT be null.  All descriptors must have
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
     * name and descriptorType fields.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     * @param inDescriptorType The type of the descriptor being
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * set. If this is null then the descriptorType field in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * descriptor is used. If specified this value must be set in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * the descriptorType field in the descriptor. Must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     * "mbean","attribute", "constructor", "operation", or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     * "notification".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * @exception RuntimeOperationsException Wraps an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     * IllegalArgumentException for illegal or null arguments or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * if the name field of the descriptor is not found in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * corresponding MBeanAttributeInfo or MBeanConstructorInfo or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * MBeanNotificationInfo or MBeanOperationInfo.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * @exception MBeanException Wraps a distributed communication
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * Exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * @see #getDescriptor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    public void setDescriptor(Descriptor inDescriptor, String inDescriptorType)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
            throws MBeanException, RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    /**
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   159
     * <p>Returns the ModelMBean's descriptor which contains MBean wide
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   160
     * policies.  This descriptor contains metadata about the MBean and default
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   161
     * policies for persistence and caching.</p>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   162
     *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   163
     * <P id="descriptor">
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   164
     * The fields in the descriptor are defined, but not limited to, the
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   165
     * following.  Note that when the Type in this table is Number, a String
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   166
     * that is the decimal representation of a Long can also be used.</P>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   167
     *
21656
d4c777ccb1db 8028014: Doclint warning/error cleanup in javax.management
rriggs
parents: 5506
diff changeset
   168
     * <table border="1" cellpadding="5" summary="ModelMBean Fields">
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   169
     * <tr><th>Name</th><th>Type</th><th>Meaning</th></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   170
     * <tr><td>name</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   171
     *     <td>MBean name.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   172
     * <tr><td>descriptorType</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   173
     *     <td>Must be "mbean".</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   174
     * <tr><td>displayName</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   175
     *     <td>Name of MBean to be used in displays.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   176
     * <tr><td>persistPolicy</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   177
     *     <td>One of: OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never.
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   178
     *         See the section "MBean Descriptor Fields" in the JMX specification
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   179
     *         document.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   180
     * <tr><td>persistLocation</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   181
     *     <td>The fully qualified directory name where the MBean should be
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   182
     *         persisted (if appropriate).</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   183
     * <tr><td>persistFile</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   184
     *     <td>File name into which the MBean should be persisted.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   185
     * <tr><td>persistPeriod</td><td>Number</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   186
     *     <td>Frequency of persist cycle in seconds, for OnTime and
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   187
     *         NoMoreOftenThan PersistPolicy</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   188
     * <tr><td>currencyTimeLimit</td><td>Number</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   189
     *     <td>How long cached value is valid: &lt;0 never, =0 always,
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   190
     *         &gt;0 seconds.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   191
     * <tr><td>log</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   192
     *     <td>t: log all notifications, f: log no notifications.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   193
     * <tr><td>logfile</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   194
     *     <td>Fully qualified filename to log events to.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   195
     * <tr><td>visibility</td><td>Number</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   196
     *     <td>1-4 where 1: always visible 4: rarely visible.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   197
     * <tr><td>export</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   198
     *     <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: 2
diff changeset
   199
     *         findable by other JMX Agents.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   200
     * <tr><td>presentationString</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   201
     *     <td>XML formatted string to allow presentation of data to be
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   202
     *         associated with the MBean.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   203
     * </table>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   204
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     * The default descriptor is: name=className,descriptorType="mbean", displayName=className,
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   207
     *  persistPolicy="never",log="F",visibility="1"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     * If the descriptor does not contain all these fields, they will be added with these default values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
     * <p><b>Note:</b> because of inconsistencies in previous versions of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * this specification, it is recommended not to use negative or zero
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * values for <code>currencyTimeLimit</code>.  To indicate that a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     * cached value is never valid, omit the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     * <code>currencyTimeLimit</code> field.  To indicate that it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     * always valid, use a very large number for this field.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
     * @return the MBean descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
     * @exception MBeanException Wraps a distributed communication
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
     * Exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
     * @exception RuntimeOperationsException a {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
     * RuntimeException} occurred while getting the descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     * @see #setMBeanDescriptor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    public Descriptor getMBeanDescriptor()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
            throws MBeanException, RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
     * Sets the ModelMBean's descriptor.  This descriptor contains default, MBean wide
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
     * metadata about the MBean and default policies for persistence and caching. This operation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
     * does a complete replacement of the descriptor, no merging is done. If the descriptor to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
     * set to is null then the default descriptor will be created.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     * The default descriptor is: name=className,descriptorType="mbean", displayName=className,
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 2
diff changeset
   236
     *  persistPolicy="never",log="F",visibility="1"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     * If the descriptor does not contain all these fields, they will be added with these default values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
     * See {@link #getMBeanDescriptor getMBeanDescriptor} method javadoc for description of valid field names.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     * @param inDescriptor the descriptor to set.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     * @exception MBeanException Wraps a distributed communication Exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     * @exception RuntimeOperationsException Wraps an IllegalArgumentException  for invalid descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
     * @see #getMBeanDescriptor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    public void setMBeanDescriptor(Descriptor inDescriptor)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
            throws MBeanException, RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
     * Returns a ModelMBeanAttributeInfo requested by name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
     * @param inName The name of the ModelMBeanAttributeInfo to get.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
     * If no ModelMBeanAttributeInfo exists for this name null is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
     * @return the attribute info for the named attribute, or null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
     * if there is none.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
     * @exception MBeanException Wraps a distributed communication
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
     * Exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
     * @exception RuntimeOperationsException Wraps an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
     * IllegalArgumentException for a null attribute name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
    public ModelMBeanAttributeInfo getAttribute(String inName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
            throws MBeanException, RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
     * Returns a ModelMBeanOperationInfo requested by name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
     * @param inName The name of the ModelMBeanOperationInfo to get.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
     * If no ModelMBeanOperationInfo exists for this name null is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
     * @return the operation info for the named operation, or null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
     * if there is none.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
     * @exception MBeanException Wraps a distributed communication Exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
     * @exception RuntimeOperationsException Wraps an IllegalArgumentException for a null operation name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
    public ModelMBeanOperationInfo getOperation(String inName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
            throws MBeanException, RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     * Returns a ModelMBeanNotificationInfo requested by name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
     * @param inName The name of the ModelMBeanNotificationInfo to get.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
     * If no ModelMBeanNotificationInfo exists for this name null is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
     * @return the info for the named notification, or null if there
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
     * is none.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
     * @exception MBeanException Wraps a distributed communication Exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
     * @exception RuntimeOperationsException Wraps an IllegalArgumentException for a null notification name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
    public ModelMBeanNotificationInfo getNotification(String inName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
            throws MBeanException, RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
     * Creates and returns a copy of this object.
29927
9cc3e111a1d8 8077923: Add missing doclint in javax.management
darcy
parents: 25859
diff changeset
   310
     * @return a copy of this object
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
    public java.lang.Object clone();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
     * Returns the list of attributes exposed for management.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
     * Each attribute is described by an <CODE>MBeanAttributeInfo</CODE> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
     * @return  An array of <CODE>MBeanAttributeInfo</CODE> objects.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
    public MBeanAttributeInfo[] getAttributes();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
     * Returns the name of the Java class of the MBean described by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
     * this <CODE>MBeanInfo</CODE>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
     * @return the Java class name.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
    public java.lang.String getClassName();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
     * Returns the list of the public constructors  of the MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
     * Each constructor is described by an <CODE>MBeanConstructorInfo</CODE> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     * @return  An array of <CODE>MBeanConstructorInfo</CODE> objects.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
    public MBeanConstructorInfo[] getConstructors();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
     * Returns a human readable description of the MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
     * @return the description.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
    public java.lang.String getDescription();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
     * Returns the list of the notifications emitted by the MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
     * Each notification is described by an <CODE>MBeanNotificationInfo</CODE> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
     * In addition to any notification specified by the application,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
     * a ModelMBean may always send also two additional notifications:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
     * <UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
     * <LI> One with descriptor name "GENERIC" and displayName "jmx.modelmbean.generic"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
     * <LI> Second is a standard attribute change notification
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
     *      with descriptor name "ATTRIBUTE_CHANGE" and displayName "jmx.attribute.change"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
     * </UL>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
     * Thus any implementation of ModelMBeanInfo should always add those two notifications
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
     * in addition to those specified by the application.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
     * @return  An array of <CODE>MBeanNotificationInfo</CODE> objects.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
    public MBeanNotificationInfo[] getNotifications();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
     * Returns the list of operations  of the MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
     * Each operation is described by an <CODE>MBeanOperationInfo</CODE> object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
     * @return  An array of <CODE>MBeanOperationInfo</CODE> objects.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
    public MBeanOperationInfo[] getOperations();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
}