public class ModelMBeanNotificationPublisher extends Object implements NotificationPublisher
NotificationPublisher implementation that uses the infrastructure
provided by the ModelMBean interface to track
javax.management.NotificationListeners
and send Notifications to those listeners.ModelMBeanNotificationBroadcaster,
NotificationPublisherAware| 构造器和说明 |
|---|
ModelMBeanNotificationPublisher(ModelMBeanNotificationBroadcaster modelMBean,
ObjectName objectName,
Object managedResource)
Create a new instance of the
ModelMBeanNotificationPublisher class
that will publish all Notifications
to the supplied ModelMBean. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
sendNotification(Notification notification)
Send the supplied
Notification using the wrapped
ModelMBean instance. |
public ModelMBeanNotificationPublisher(ModelMBeanNotificationBroadcaster modelMBean, ObjectName objectName, Object managedResource)
ModelMBeanNotificationPublisher class
that will publish all Notifications
to the supplied ModelMBean.modelMBean - the target ModelMBean; must not be nullobjectName - the ObjectName of the source ModelMBeanmanagedResource - the managed resource exposed by the supplied ModelMBeanIllegalArgumentException - if any of the parameters is nullpublic void sendNotification(Notification notification)
Notification using the wrapped
ModelMBean instance.sendNotification 在接口中 NotificationPublishernotification - the Notification to be sentIllegalArgumentException - if the supplied notification is nullUnableToSendNotificationException - if the supplied notification could not be sent