Java Dynamic Management Kit 4.0 Tutorial

The MBean Descriptor 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, they are referred to as the MBean descriptor classes because they provide information about the MBean. This information includes the attributes and operations of the management interface but also the list of constructors for the MBean class and the notifications that the MBean may send. Notifications are messages in the event mechanism that is defined by the JMX architecture; they are covered in the notification example in examplesDir/Notification.

Each element is described by its descriptor object containing its name, a description string, and its characteristics. For example, an attribute has a type and is readable and/or writeable. The following table lists all MBean descriptor classes:

Class Name 

Purpose 

MBeanInfo Top-level object containing arrays of descriptors for all MBean elements; also includes the name of the MBean's Java class and a description string
MBeanFeatureInfo Parent class for all other descriptors so that they 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 writeable
MBeanNotificationInfo Contains an array of notification type strings