public class ModelMBeanNotificationPublisher extends java.lang.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
Constructor and Description |
---|
ModelMBeanNotificationPublisher(javax.management.modelmbean.ModelMBeanNotificationBroadcaster modelMBean,
javax.management.ObjectName objectName,
java.lang.Object managedResource)
Create a new instance of the
ModelMBeanNotificationPublisher class
that will publish all Notifications
to the supplied ModelMBean . |
Modifier and Type | Method and Description |
---|---|
void |
sendNotification(javax.management.Notification notification)
Send the supplied
Notification using the wrapped
ModelMBean instance. |
public ModelMBeanNotificationPublisher(javax.management.modelmbean.ModelMBeanNotificationBroadcaster modelMBean, javax.management.ObjectName objectName, java.lang.Object managedResource)
ModelMBeanNotificationPublisher
class
that will publish all Notifications
to the supplied ModelMBean
.modelMBean
- the target ModelMBean
; must not be null
objectName
- the ObjectName
of the source ModelMBean
managedResource
- the managed resource exposed by the supplied ModelMBean
java.lang.IllegalArgumentException
- if any of the parameters is null
public void sendNotification(javax.management.Notification notification)
Notification
using the wrapped
ModelMBean
instance.sendNotification
in interface NotificationPublisher
notification
- the Notification
to be sentjava.lang.IllegalArgumentException
- if the supplied notification
is null
UnableToSendNotificationException
- if the supplied notification
could not be sent