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

All Known Implementing Classes:

[ModelMBeanInfoSupport](ModelMBeanInfoSupport.html "class in javax.management.modelmbean")


public interface ModelMBeanInfo

This interface is implemented by the ModelMBeanInfo for every ModelMBean. An implementation of this interface must be shipped with every JMX Agent.

Java resources wishing to be manageable instantiate the ModelMBean using the MBeanServer's createMBean method. The resource then sets the ModelMBeanInfo and Descriptors for the ModelMBean instance. The attributes, operations, and notifications exposed via the ModelMBeanInfo for the ModelMBean comprise the management interface and are accessible from MBeans, connectors/adaptors like other MBeans. Through the Descriptors, values and methods in the managed application can be defined and mapped to attributes and operations of the ModelMBean. This mapping can be defined during development in a file or dynamically and programmatically at runtime.

Every ModelMBean which is instantiated in the MBeanServer becomes manageable: its attributes, operations, and notifications become remotely accessible through the connectors/adaptors connected to that MBeanServer. A Java object cannot be registered in the MBeanServer unless it is a JMX compliant MBean. By instantiating a ModelMBean, resources are guaranteed that the MBean is valid. MBeanException and RuntimeOperationsException must be thrown on every public method. This allows for wrapping exceptions from distributed communications (RMI, EJB, etc.)

Since:

1.5

Modifier and Type Method Description
Object clone() Creates and returns a copy of this object.
ModelMBeanAttributeInfo getAttribute​(String inName) Returns a ModelMBeanAttributeInfo requested by name.
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​(String inDescriptorName,String inDescriptorType) Returns a Descriptor requested by name and descriptorType.
Descriptor[] getDescriptors​(String inDescriptorType) Returns a Descriptor array consisting of all Descriptors for the ModelMBeanInfo of type inDescriptorType.
Descriptor getMBeanDescriptor() Returns the ModelMBean's descriptor which contains MBean wide policies.
ModelMBeanNotificationInfo getNotification​(String inName) Returns a ModelMBeanNotificationInfo requested by name.
MBeanNotificationInfo[] getNotifications() Returns the list of the notifications emitted by the MBean.
ModelMBeanOperationInfo getOperation​(String inName) Returns a ModelMBeanOperationInfo requested by name.
MBeanOperationInfo[] getOperations() Returns the list of operations of the MBean.
void setDescriptor​(Descriptor inDescriptor,String inDescriptorType) Sets descriptors in the info array of type inDescriptorType for the ModelMBean.
void setDescriptors​(Descriptor[] inDescriptors) Adds or replaces descriptors in the ModelMBeanInfo.
void setMBeanDescriptor​(Descriptor inDescriptor) Sets the ModelMBean's descriptor.