RequiredModelMBean (Java SE 19 & JDK 19) (original) (raw)

All Implemented Interfaces:

[DynamicMBean](../DynamicMBean.html "interface in javax.management"), [MBeanRegistration](../MBeanRegistration.html "interface in javax.management"), [ModelMBean](ModelMBean.html "interface in javax.management.modelmbean"), [ModelMBeanNotificationBroadcaster](ModelMBeanNotificationBroadcaster.html "interface in javax.management.modelmbean"), [NotificationBroadcaster](../NotificationBroadcaster.html "interface in javax.management"), [NotificationEmitter](../NotificationEmitter.html "interface in javax.management"), [PersistentMBean](../PersistentMBean.html "interface in javax.management")


This class is the implementation of a ModelMBean. An appropriate implementation of a ModelMBean must be shipped with every JMX Agent and the class must be named RequiredModelMBean.

Java resources wishing to be manageable instantiate the RequiredModelMBean using the MBeanServer's createMBean method. The resource then sets the MBeanInfo and Descriptors for the RequiredModelMBean instance. The attributes and operations exposed via the ModelMBeanInfo for the ModelMBean 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 in an XML formatted file or dynamically and programmatically at runtime.

Every RequiredModelMBean which is instantiated in the MBeanServer becomes manageable:
its attributes and operations 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 RequiredModelMBean, 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

Constructors
Constructs an RequiredModelMBean with an empty ModelMBeanInfo.
Constructs a RequiredModelMBean object using ModelMBeanInfo passed in.

void
Registers an object which implements the NotificationListener interface as a listener.
void
Registers an object which implements the NotificationListener interface as a listener.
Returns the value of a specific attribute defined for this ModelMBean.
Returns the values of several attributes in the ModelMBean.
Return the Class Loader Repository used to perform class loading.
Returns the attributes, operations, constructors and notifications that this RequiredModelMBean exposes for management.
Returns the array of Notifications always generated by the RequiredModelMBean.
Invokes a method on or through a RequiredModelMBean and returns the result of the method execution.
void
[load](#load%28%29)()
Instantiates this MBean instance with the data found for the MBean in the persistent store.
void
Allows the MBean to perform any operations needed after having been unregistered in the MBean server.
void
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
void
Allows the MBean to perform any operations it needs before being unregistered by the MBean server.
Allows the MBean to perform any operations it needs before being registered in the MBean server.
void
Removes a listener for attributeChangeNotifications from the RequiredModelMBean.
void
Removes a listener for Notifications from the RequiredModelMBean.
void
Removes a listener from this MBean.
void
Sends an attributeChangeNotification which is passed in to the registered attributeChangeNotification listeners on the ModelMBean.
void
Sends an attributeChangeNotification which contains the old value and new value for the attribute to the registered AttributeChangeNotification listeners on the ModelMBean.
void
Sends a Notification which contains the text string that is passed in to the registered Notification listeners on the ModelMBean.
void
Sends a Notification which is passed in to the registered Notification listeners on the ModelMBean as a jmx.modelmbean.generic notification.
void
Sets the value of a specific attribute of a named ModelMBean.
Sets the values of an array of attributes of this ModelMBean.
void
Sets the instance handle of the object against which to execute all methods in this ModelMBean management interface (MBeanInfo and Descriptors).
void
Initializes a ModelMBean object using ModelMBeanInfo passed in.
void
[store](#store%28%29)()
Captures the current state of this MBean instance and writes it out to the persistent store.

Methods declared in class java.lang.Object

[clone](../../../../java.base/java/lang/Object.html#clone%28%29), [equals](../../../../java.base/java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../../java.base/java/lang/Object.html#finalize%28%29), [getClass](../../../../java.base/java/lang/Object.html#getClass%28%29), [hashCode](../../../../java.base/java/lang/Object.html#hashCode%28%29), [notify](../../../../java.base/java/lang/Object.html#notify%28%29), [notifyAll](../../../../java.base/java/lang/Object.html#notifyAll%28%29), [toString](../../../../java.base/java/lang/Object.html#toString%28%29), [wait](../../../../java.base/java/lang/Object.html#wait%28%29), [wait](../../../../java.base/java/lang/Object.html#wait%28long%29), [wait](../../../../java.base/java/lang/Object.html#wait%28long,int%29)