jdk/src/java.management/share/classes/javax/management/openmbean/package.html
author uvangapally
Tue, 01 Aug 2017 10:33:47 +0530
changeset 46050 f51c14dc540f
parent 44858 7183899b064b
permissions -rw-r--r--
8181895: javax management docs contain links to technotes Summary: Edited links to point to Alternate paths Reviewed-by: rriggs Contributed-by: ujwal.vangapally@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
<html>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
<head>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
<title>javax.management.openmbean package</title>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
<!--
46050
f51c14dc540f 8181895: javax management docs contain links to technotes
uvangapally
parents: 44858
diff changeset
     5
Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    10
published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    12
by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
5551
327690766109 6956202: Fix a few missed rebranding issues, please contact lines etc.
ohair
parents: 5506
diff changeset
    24
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
327690766109 6956202: Fix a few missed rebranding issues, please contact lines etc.
ohair
parents: 5506
diff changeset
    25
or visit www.oracle.com if you need additional information or have any
327690766109 6956202: Fix a few missed rebranding issues, please contact lines etc.
ohair
parents: 5506
diff changeset
    26
questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
-->
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
</head>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
<body bgcolor="white">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
    <p>Provides the open data types and Open MBean descriptor classes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
      An <em>Open MBean</em> is an MBean where the types of attributes
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
      and of operation parameters and return values are built using a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
      small set of predefined Java classes.  Open MBeans facilitate
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
      operation with remote management programs that do not necessarily
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
      have access to application-specific types, including non-Java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
      programs.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
    <p>Every MBean has an {@link javax.management.MBeanInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
      MBeanInfo} with information about the MBean itself, and its
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
      attributes, operations, constructors, and notifications.  In an
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
      Open MBean, this <code>MBeanInfo</code> implements the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
      javax.management.openmbean.OpenMBeanInfo OpenMBeanInfo}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
      interface, usually by being an instance of {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
      javax.management.openmbean.OpenMBeanInfoSupport
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
      OpenMBeanInfoSupport}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    <p>The attribute information returned by {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
      javax.management.MBeanInfo#getAttributes()
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
      MBeanInfo.getAttributes} for an Open MBean is an array of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
      objects implementing {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
      javax.management.openmbean.OpenMBeanAttributeInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
      OpenMBeanAttributeInfo}, usually instances of {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
      javax.management.openmbean.OpenMBeanAttributeInfoSupport
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
      OpenMBeanAttributeInfoSupport}.  In addition to the usual
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
      information about attributes, an
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
      <code>OpenMBeanAttributeInfo</code> specifies the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
      javax.management.openmbean.OpenType OpenType} of the attribute.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
      The possible <code>OpenType</code> values are predefined, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
      is what ensures that remote managers will understand them.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    <p>Similar remarks apply to the parameter types of operations and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
      constructors, and to the return types of operations.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    <p>There is a distinction between an attribute's Java language
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
      type, as returned by {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
      javax.management.MBeanAttributeInfo#getType() getType()}, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
      its <code>OpenType</code>, as returned by {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
      javax.management.openmbean.OpenMBeanAttributeInfo#getOpenType()
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
      getOpenType()}.  For example, if the Java language type is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
      <code>java.lang.String</code>, the <code>OpenType</code> will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
      {@link javax.management.openmbean.SimpleType#STRING
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
      SimpleType.String}.  If the Java language type is {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
      javax.management.openmbean.CompositeData}, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
      <code>OpenType</code> will be a {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
      javax.management.openmbean.CompositeType CompositeType} that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
      describes the items in the <code>CompositeData</code> instances
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
      for the attribute.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
44858
7183899b064b 8179415: Update java.management and java.management.rmi to be HTML-5 friendly
ksrini
parents: 25859
diff changeset
    80
    <h2><a id="constraints">Default values and constraints</a></h2>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    <p>In Open MBeans, attributes and parameters can have default values
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
      and/or constraints associated with them in the {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
      OpenMBeanAttributeInfo} or {@code OpenMBeanParameterInfo}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
      There are two ways to specify these constraints.  Either the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
      values are directly specified as parameters to one of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
      constructors of {@code OpenMBeanAttributeInfoSupport} or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
      {@code OpenMBeanParameterInfoSupport}, for example
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
      {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
      javax.management.openmbean.OpenMBeanParameterInfoSupport#OpenMBeanParameterInfoSupport(
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
      String, String, OpenType, Object, Object[])}; or the values are
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
      specified in a {@link javax.management.Descriptor Descriptor} given
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
      as a parameter to one of the constructors.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    <p>When a {@code Descriptor} is used, the fields of interest are
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
      these:</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
      <li>{@code defaultValue} defines the value returned by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
	{@link javax.management.openmbean.OpenMBeanParameterInfo#getDefaultValue()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
	getDefaultValue()};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
      <li>{@code minValue} defines the value returned by {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
	javax.management.openmbean.OpenMBeanParameterInfo#getMinValue() getMinValue()};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
      <li>{@code maxValue} defines the value returned by {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
	javax.management.openmbean.OpenMBeanParameterInfo#getMaxValue() getMaxValue()};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
      <li>{@code legalValues} defines the values returned by {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
	javax.management.openmbean.OpenMBeanParameterInfo#getLegalValues() getLegalValues()}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    <p>For {@code defaultValue}, {@code minValue}, and {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
      maxValue}, the associated value must either be of the Java type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
      corresponding to {@code openType}, or be a string that can be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
      converted into that type.  The conversion uses the static method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
      {@code valueOf(String)} if it finds one; otherwise a constructor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
      with a single {@code String} parameter if it finds one; otherwise
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
      it fails.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    <p>For {@code legalValues}, the associated value must be either
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
      an array or a {@code Set}, and the elements of the array or set
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
      must be convertible as described for {@code defaultValue} etc.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    <p>The following conditions must be met for these fields:</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
      <li>the values must be of the appropriate type, or be strings
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
	that can be converted to the appropriate type as explained
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
	above;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
      <li>if {@code legalValues} is present then neither {@code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
	minValue} nor {@code maxValue} must be present;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
      <li>if {@code defaultValue} is present then it must satisfy the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
	constraints defined by {@code legalValues}, {@code minValue}, or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
	{@code maxValue} when any of these is also present;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
      <li>if {@code minValue} and {@code maxValue} are both present
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
	then {@code minValue} must not be greater than {@code maxValue}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
46050
f51c14dc540f 8181895: javax management docs contain links to technotes
uvangapally
parents: 44858
diff changeset
   145
    @see <a href="https://jcp.org/aboutJava/communityprocess/mrel/jsr160/index2.html">
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
      JMX Specification, version 1.4</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
</BODY>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
</HTML>