Describes the management interface exposed by an MBean; that is, the set of attributes and operations which are available for management operations. Instances of this class are immutable. Subclasses may be mutable but this is not recommended.
Usually the {@code MBeanInfo} for any given MBean doesnot change over the lifetime of that MBean. Dynamic MBeans can change their {@code MBeanInfo} and in that case it is recommended that they emit a {@link Notification} with a {@linkplain Notification#getType() type} of {@code "jmx.mbean.info.changed"} and a {@linkplain Notification#getUserData() userData} that is the new {@code MBeanInfo}. This is not required, but provides a conventional way for clients of the MBean to discover the change. See also the immutableInfo and infoTimeout fields in the {@code MBeanInfo} {@link Descriptor}.
The contents of the MBeanInfo
for a Dynamic MBean are determined by its {@link DynamicMBean#getMBeanInfo getMBeanInfo()} method. This includes Open MBeans and ModelMBeans, which are kinds of Dynamic MBeans.
The contents of the MBeanInfo
for a Standard MBean are determined by the MBean server as follows:
- {@link #getClassName()} returns the Java class name of the MBeanobject;
- {@link #getConstructors()} returns the list of all publicconstructors in that object;
- {@link #getAttributes()} returns the list of all attributeswhose existence is deduced from the presence in the MBean interface of a
getName
, isName
, or setName
method that conforms to the conventions for Standard MBeans; - {@link #getOperations()} returns the list of all methods inthe MBean interface that do not represent attributes;
- {@link #getNotifications()} returns an empty array if the MBeandoes not implement the {@link NotificationBroadcaster} interface,otherwise the result of calling {@link NotificationBroadcaster#getNotificationInfo()} on it;
- {@link #getDescriptor()} returns a descriptor containing the contentsof any descriptor annotations in the MBean interface (see {@link DescriptorKey @DescriptorKey}).
The description returned by {@link #getDescription()} and thedescriptions of the contained attributes and operations are not specified.
The remaining details of the MBeanInfo
for a Standard MBean are not specified. This includes the description of any contained constructors, and notifications; the names of parameters to constructors and operations; and the descriptions of constructor parameters.
@since 1.5