Class ModelMBeanNotificationPublisher
- java.lang.Object
- org.springframework.jmx.export.notification.ModelMBeanNotificationPublisher
- All Implemented Interfaces:
NotificationPublisher
public class ModelMBeanNotificationPublisher extends Object implements NotificationPublisher
NotificationPublisherimplementation that uses the infrastructure provided by theModelMBeaninterface to trackjavax.management.NotificationListenersand sendNotificationsto those listeners.- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller, Rick Evans
- See Also:
ModelMBeanNotificationBroadcaster,NotificationPublisherAware
Constructor Summary
Constructors Constructor Description ModelMBeanNotificationPublisher(ModelMBeanNotificationBroadcaster modelMBean, ObjectName objectName, Object managedResource)Create a new instance of theModelMBeanNotificationPublisherclass that will publish allNotificationsto the suppliedModelMBean.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsendNotification(Notification notification)Send the suppliedNotificationusing the wrappedModelMBeaninstance.
Constructor Detail
ModelMBeanNotificationPublisher
public ModelMBeanNotificationPublisher(ModelMBeanNotificationBroadcaster modelMBean, ObjectName objectName, Object managedResource)
Create a new instance of theModelMBeanNotificationPublisherclass that will publish allNotificationsto the suppliedModelMBean.- Parameters:
modelMBean- the targetModelMBean; must not benullobjectName- theObjectNameof the sourceModelMBeanmanagedResource- the managed resource exposed by the suppliedModelMBean- Throws:
IllegalArgumentException- if any of the parameters isnull
Method Detail
sendNotification
public void sendNotification(Notification notification)
Send the suppliedNotificationusing the wrappedModelMBeaninstance.- Specified by:
sendNotificationin interfaceNotificationPublisher- Parameters:
notification- theNotificationto be sent- Throws:
IllegalArgumentException- if the suppliednotificationisnullUnableToSendNotificationException- if the suppliednotificationcould not be sent