StandardEmitterMBean (Java SE 16 & JDK 16) (original) (raw)

All Implemented Interfaces:

[DynamicMBean](DynamicMBean.html "interface in javax.management"), [MBeanRegistration](MBeanRegistration.html "interface in javax.management"), [NotificationBroadcaster](NotificationBroadcaster.html "interface in javax.management"), [NotificationEmitter](NotificationEmitter.html "interface in javax.management")


An MBean whose management interface is determined by reflection on a Java interface, and that emits notifications.

The following example shows how to use the public constructorStandardEmitterMBean(implementation, mbeanInterface, emitter) to create an MBean emitting notifications with any implementation class name Impl, with a management interface defined (as for current Standard MBeans) by any interface_Intf_, and with any implementation of the interfaceNotificationEmitter. The example uses the classNotificationBroadcasterSupport as an implementation of the interface NotificationEmitter.

 MBeanServer mbs;
 ...
 final String[] types = new String[] {"sun.disc.space","sun.disc.alarm"};
 final MBeanNotificationInfo info = new MBeanNotificationInfo(
                                      types,
                                      Notification.class.getName(),
                                      "Notification about disc info.");
 final NotificationEmitter emitter =
                new NotificationBroadcasterSupport(info);

 final Intf impl = new Impl(...);
 final Object mbean = new StandardEmitterMBean(
                                 impl, Intf.class, emitter);
 mbs.registerMBean(mbean, objectName);
 

Since:

1.6

See Also:

StandardMBean

Constructors
protected
Make an MBean whose management interface is specified bymbeanInterface, and where notifications are handled by the given NotificationEmitter.
protected
Make an MBean whose management interface is specified bymbeanInterface, and where notifications are handled by the given NotificationEmitter.
Make an MBean whose management interface is specified bymbeanInterface, with the given implementation and where notifications are handled by the given NotificationEmitter.
Make an MBean whose management interface is specified bymbeanInterface, with the given implementation and where notifications are handled by the given NotificationEmitter.

void
Adds a listener to this MBean.
Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.
void
Removes a listener from this MBean.
void
Removes a listener from this MBean.
void

Methods declared in class javax.management.StandardMBean

[cacheMBeanInfo](StandardMBean.html#cacheMBeanInfo%28javax.management.MBeanInfo%29), [getAttribute](StandardMBean.html#getAttribute%28java.lang.String%29), [getAttributes](StandardMBean.html#getAttributes%28java.lang.String%5B%5D%29), [getCachedMBeanInfo](StandardMBean.html#getCachedMBeanInfo%28%29), [getClassName](StandardMBean.html#getClassName%28javax.management.MBeanInfo%29), [getConstructors](StandardMBean.html#getConstructors%28javax.management.MBeanConstructorInfo%5B%5D,java.lang.Object%29), [getDescription](StandardMBean.html#getDescription%28javax.management.MBeanAttributeInfo%29), [getDescription](StandardMBean.html#getDescription%28javax.management.MBeanConstructorInfo%29), [getDescription](StandardMBean.html#getDescription%28javax.management.MBeanConstructorInfo,javax.management.MBeanParameterInfo,int%29), [getDescription](StandardMBean.html#getDescription%28javax.management.MBeanFeatureInfo%29), [getDescription](StandardMBean.html#getDescription%28javax.management.MBeanInfo%29), [getDescription](StandardMBean.html#getDescription%28javax.management.MBeanOperationInfo%29), [getDescription](StandardMBean.html#getDescription%28javax.management.MBeanOperationInfo,javax.management.MBeanParameterInfo,int%29), [getImpact](StandardMBean.html#getImpact%28javax.management.MBeanOperationInfo%29), [getImplementation](StandardMBean.html#getImplementation%28%29), [getImplementationClass](StandardMBean.html#getImplementationClass%28%29), [getMBeanInfo](StandardMBean.html#getMBeanInfo%28%29), [getMBeanInterface](StandardMBean.html#getMBeanInterface%28%29), [getParameterName](StandardMBean.html#getParameterName%28javax.management.MBeanConstructorInfo,javax.management.MBeanParameterInfo,int%29), [getParameterName](StandardMBean.html#getParameterName%28javax.management.MBeanOperationInfo,javax.management.MBeanParameterInfo,int%29), [invoke](StandardMBean.html#invoke%28java.lang.String,java.lang.Object%5B%5D,java.lang.String%5B%5D%29), [postDeregister](StandardMBean.html#postDeregister%28%29), [postRegister](StandardMBean.html#postRegister%28java.lang.Boolean%29), [preDeregister](StandardMBean.html#preDeregister%28%29), [preRegister](StandardMBean.html#preRegister%28javax.management.MBeanServer,javax.management.ObjectName%29), [setAttribute](StandardMBean.html#setAttribute%28javax.management.Attribute%29), [setAttributes](StandardMBean.html#setAttributes%28javax.management.AttributeList%29), [setImplementation](StandardMBean.html#setImplementation%28java.lang.Object%29)

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)