Java Dynamic Management Kit 5.1 Tutorial

2.1.2 MBean Metadata Classes

A dynamic MBean has the burden of building the description of its own management interface. The JMX specification defines the Java objects used to completely describe the management interface of an MBean. Dynamic MBeans use these objects to provide a complete self description as returned by the getMBeanInfo method. Agents also use these classes to describe a standard MBean after it has been introspected.

As a group, these classes are referred to as the MBean metadata classes because they provide information about the MBean. This information includes the attributes and operations of the management interface, also the list of constructors for the MBean class, and the notifications that the MBean might send. Notifications are event messages that are defined by the JMX architecture. See Chapter 8, Notification Mechanism.

Each element is described by its metadata object containing its name, a description string, and its characteristics. For example, an attribute has a type and is readable and/or writable. Table 2–1 lists all MBean metadata classes.

Table 2–1 MBean Metadata Classes

Class Name 

Purpose 

MBeanInfo

Top-level object containing arrays of metadata objects for all MBean elements; also includes the name of the MBean's Java class and a description string 

MBeanFeatureInfo

Parent class from which all other metadata objects inherit a name and a description string 

MBeanOperationInfo

Describes an operation: the return type, the signature as an array of parameters, and the impact (whether the operation just returns information or modifies the resource) 

MBeanConstructorInfo

Describes a constructor by its signature 

MBeanParameterInfo

Gives the type of a parameter in an operation or constructor signature 

MBeanAttributeInfo

Describes an attribute: its type, whether it is readable, and whether it is writable 

MBeanNotificationInfo

Contains an array of notification type strings