Provides the open data types and Open MBean descriptor classes. An Open MBean is an MBean where the types of attributes and of operation parameters and return values are built using a small set of predefined Java classes. Open MBeans facilitate operation with remote management programs that do not necessarily have access to application-specific types, including non-Java programs.
Every MBean has an MBeanInfo with information about the MBean itself, and its
attributes, operations, constructors, and notifications. In an
Open MBean, this MBeanInfo implements the OpenMBeanInfo
interface, usually by being an instance of OpenMBeanInfoSupport.
The attribute information returned by MBeanInfo. for an Open MBean is an array of
objects implementing OpenMBeanAttributeInfo, usually instances of OpenMBeanAttributeInfoSupport. In addition to the usual
information about attributes, an
OpenMBeanAttributeInfo specifies the OpenType of the attribute.
The possible OpenType values are predefined, which
is what ensures that remote managers will understand them.
Similar remarks apply to the parameter types of operations and constructors, and to the return types of operations.
There is a distinction between an attribute's Java language
type, as returned by getType(), and
its OpenType, as returned by getOpenType(). For example, if the Java language type is
java.lang.String, the OpenType will be
SimpleType.. If the Java language type is javax., the
OpenType will be a CompositeType that
describes the items in the CompositeData instances
for the attribute.
In Open MBeans, attributes and parameters can have default values
and/or constraints associated with them in the OpenMBeanAttributeInfo or OpenMBeanParameterInfo.
There are two ways to specify these constraints. Either the
values are directly specified as parameters to one of the
constructors of OpenMBeanAttributeInfoSupport or
OpenMBeanParameterInfoSupport, for example
javax.; or the values are
specified in a Descriptor given
as a parameter to one of the constructors.
When a Descriptor is used, the fields of interest are
these:
defaultValue defines the value returned by
getDefaultValue();
minValue defines the value returned by getMinValue();
maxValue defines the value returned by getMaxValue();
legalValues defines the values returned by getLegalValues().
For defaultValue, minValue, and maxValue, the associated value must either be of the Java type
corresponding to openType, or be a string that can be
converted into that type. The conversion uses the static method
valueOf(String) if it finds one; otherwise a constructor
with a single String parameter if it finds one; otherwise
it fails.
For legalValues, the associated value must be either
an array or a Set, and the elements of the array or set
must be convertible as described for defaultValue etc.
The following conditions must be met for these fields:
legalValues is present then neither minValue nor maxValue must be present;
defaultValue is present then it must satisfy the
constraints defined by legalValues, minValue, or
maxValue when any of these is also present;
minValue and maxValue are both present
then minValue must not be greater than maxValue.
| Modifier and Type | Interface and Description |
|---|---|
| public interface | CompositeData
The |
| public interface | CompositeDataView
A Java class can implement this interface to indicate how it is
to be converted into a |
| public interface | OpenMBeanAttributeInfo
Describes an attribute of an open MBean. |
| public interface | OpenMBeanConstructorInfo
Describes a constructor of an Open MBean. |
| public interface | OpenMBeanInfo
Describes an Open MBean: an Open MBean is recognized as such if
its |
| public interface | OpenMBeanOperationInfo
Describes an operation of an Open MBean. |
| public interface | OpenMBeanParameterInfo
Describes a parameter used in one or more operations or constructors of an open MBean. |
| public interface | TabularData
The |
| Modifier and Type | Class and Description |
|---|---|
| public class | ArrayType<
the Java component type that arrays described by this ArrayType must
have. T>The |
| public class | CompositeDataInvocationHandler
An |
| public class | CompositeDataSupport
The |
| public class | CompositeType
The |
| public class | InvalidKeyException
This runtime exception is thrown to indicate that a method parameter which was expected to be an item name of a composite data or a row index of a tabular data is not valid. |
| public class | InvalidOpenTypeException
This runtime exception is thrown to indicate that the open type of an open data value is not the one expected. |
| public class | KeyAlreadyExistsException
This runtime exception is thrown to indicate that the index of a row to be added to a tabular data instance is already used to refer to another row in this tabular data instance. |
| public class | OpenDataException
This checked exception is thrown when an open type, an open data or an open MBean metadata info instance could not be constructed because one or more validity constraints were not met. |
| public class | OpenMBeanAttributeInfoSupport
Describes an attribute of an open MBean. |
| public class | OpenMBeanConstructorInfoSupport
Describes a constructor of an Open MBean. |
| public class | OpenMBeanInfoSupport
The |
| public class | OpenMBeanOperationInfoSupport
Describes an operation of an Open MBean. |
| public class | OpenMBeanParameterInfoSupport
Describes a parameter used in one or more operations or constructors of an open MBean. |
| public abstract class | OpenType<
the Java type that instances described by this type must
have. For example, T>SimpleType#INTEGER is a SimpleType<Integer> which is a subclass of OpenType<Integer>,
meaning that an attribute, parameter, or return value that is described
as a SimpleType.INTEGER must have Java type
Integer.The |
| public class | SimpleType<
the Java type that values described by this SimpleType must
have. T>The |
| public class | TabularDataSupport
The |
| public class | TabularType
The |