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 {@link MBeanInfo} with information about the MBean itself, and its attributes, operations, constructors, and notifications. In an Open MBean, this MBeanInfo implements the {@link OpenMBeanInfo} interface, usually by being an instance of {@link OpenMBeanInfoSupport}.

The attribute information returned by {@link MBeanInfo.getAttributes} for an Open MBean is an array of objects implementing {@link OpenMBeanAttributeInfo}, usually instances of {@link OpenMBeanAttributeInfoSupport}. In addition to the usual information about attributes, an OpenMBeanAttributeInfo specifies the {@link 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 {@link getType()}, and its OpenType, as returned by {@link getOpenType()}. For example, if the Java language type is java.lang.String, the OpenType will be {@link SimpleType.String}. If the Java language type is {@link}, the OpenType will be a {@link CompositeType} that describes the items in the CompositeData instances for the attribute.

Default values and constraints

In Open MBeans, attributes and parameters can have default values and/or constraints associated with them in the {@code OpenMBeanAttributeInfo} or {@code OpenMBeanParameterInfo}. There are two ways to specify these constraints. Either the values are directly specified as parameters to one of the constructors of {@code OpenMBeanAttributeInfoSupport} or {@code OpenMBeanParameterInfoSupport}, for example {@link String, String, OpenType, Object, Object[])}; or the values are specified in a {@link Descriptor} given as a parameter to one of the constructors.

When a {@code Descriptor} is used, the fields of interest are these:

For {@code defaultValue}, {@code minValue}, and {@code maxValue}, the associated value must either be of the Java type corresponding to {@code openType}, or be a string that can be converted into that type. The conversion uses the static method {@code valueOf(String)} if it finds one; otherwise a constructor with a single {@code String} parameter if it finds one; otherwise it fails.

For {@code legalValues}, the associated value must be either an array or a {@code Set}, and the elements of the array or set must be convertible as described for {@code defaultValue} etc.

The following conditions must be met for these fields:

@see Java SE 6 Platform documentation on JMX technology, in particular the JMX Specification, version 1.4 @since 1.5