MBeanInfo (Java SE 15 & JDK 15) (original) (raw)

All Implemented Interfaces:

[Serializable](../../../java.base/java/io/Serializable.html "interface in java.io"), [Cloneable](../../../java.base/java/lang/Cloneable.html "interface in java.lang"), [DescriptorRead](DescriptorRead.html "interface in javax.management")

Direct Known Subclasses:

[ModelMBeanInfoSupport](modelmbean/ModelMBeanInfoSupport.html "class in javax.management.modelmbean"), [OpenMBeanInfoSupport](openmbean/OpenMBeanInfoSupport.html "class in javax.management.openmbean")


public class MBeanInfo extends Object implements Cloneable, Serializable, DescriptorRead

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 MBeanInfo for any given MBean does not change over the lifetime of that MBean. Dynamic MBeans can change theirMBeanInfo and in that case it is recommended that they emit a Notification with a type of "jmx.mbean.info.changed" and a userData that is the new MBeanInfo. This is not required, but provides a conventional way for clients of the MBean to discover the change. See also the immutableInfo andinfoTimeout fields in the MBeanInfo Descriptor.

The contents of the MBeanInfo for a Dynamic MBean are determined by its getMBeanInfo() method. This includes Open MBeans and Model MBeans, which are kinds of Dynamic MBeans.

The contents of the MBeanInfo for a Standard MBean are determined by the MBean server as follows:

The description returned by getDescription() and the descriptions 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

See Also:

Serialized Form

Constructors

Constructor Description
MBeanInfo​(String className,String description,MBeanAttributeInfo[] attributes,MBeanConstructorInfo[] constructors,MBeanOperationInfo[] operations,MBeanNotificationInfo[] notifications) Constructs an MBeanInfo.
MBeanInfo​(String className,String description,MBeanAttributeInfo[] attributes,MBeanConstructorInfo[] constructors,MBeanOperationInfo[] operations,MBeanNotificationInfo[] notifications,Descriptor descriptor) Constructs an MBeanInfo.
Modifier and Type Method Description
Object clone() Returns a shallow clone of this instance.
boolean equals​(Object o) Compare this MBeanInfo to another.
MBeanAttributeInfo[] getAttributes() Returns the list of attributes exposed for management.
String getClassName() Returns the name of the Java class of the MBean described by this MBeanInfo.
MBeanConstructorInfo[] getConstructors() Returns the list of the public constructors of the MBean.
String getDescription() Returns a human readable description of the MBean.
Descriptor getDescriptor() Get the descriptor of this MBeanInfo.
MBeanNotificationInfo[] getNotifications() Returns the list of the notifications emitted by the MBean.
MBeanOperationInfo[] getOperations() Returns the list of operations of the MBean.