Java Reference
In-Depth Information
object value of one of the basic data types of the Open MBean. In addition, a
Com-
positeData
instance is immutable: once it's created, you cannot add more pairs
or change the values of others that it already contains.
The
CompositeData
class contains methods to return values based on a specific
key or to enumerate all the values.
A.3.2
The TabularData interface
TabularData
objects contain sets of
CompositeData
values as rows. Each
Composite-
Data
object represents a single row in a
TabularData
instance. Unlike
Composite-
Data
objects,
TabularData
objects are not immutable—you can add and remove
rows at any time. However, every row in the
TabularData
structure must have the
same description as all the others. Descriptions are important in the Open MBean
world, and each
CompositeData
instance contains a descriptive object explaining
the meaning and purpose of the data it contains. This means that an instance of
the
TabularData
type contains rows of the same
CompositeData
description.
TabularData
objects also support methods for adding, removing, finding, and
enumerating the rows they contain.
A.4 Describing Open MBean data types
In order for a management user (or management code) to be able to get the max-
imum meaning from primitive types, and to be able to understand the more com-
plex types such as
CompositeData
and
TabularData
, Open MBeans use description
classes to describe the basic data types.
These description classes are known as the
open types
, and they describe the
basic data types used by all Open MBeans. Every open type class is a subclass of
the
OpenType
class. There is an
OpenType
subclass for each category of classes for
the basic data types (primitive, composite, tabular, and arrays). The
OpenType
class defines methods that provide a data type name, description, and actual
classname. The following are the
OpenType
subclasses:
■
SimpleType
—Describes the primitive data types and the
ObjectName
class
■
ArrayType
—Describes arrays of the basic data types
■
CompositeType
—Describes the
CompositeData
class data type
■
TabularType
—Describes the
TabularData
class data type
The
SimpleType
class provides static instances of the
SimpleType
class that give
the name, description, and classname of each of the primitive and
ObjectName