Class ModelMBeanNotificationPublisher
java.lang.Object
org.springframework.jmx.export.notification.ModelMBeanNotificationPublisher
- All Implemented Interfaces:
NotificationPublisher
NotificationPublisher implementation that uses the infrastructure
provided by the ModelMBean interface to track
javax.management.NotificationListeners
and send Notifications to those listeners.- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller, Rick Evans
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModelMBeanNotificationPublisher(ModelMBeanNotificationBroadcaster modelMBean, ObjectName objectName, Object managedResource) Create a new instance of theModelMBeanNotificationPublisherclass that will publish allNotificationsto the suppliedModelMBean. -
Method Summary
Modifier and TypeMethodDescriptionvoidsendNotification(Notification notification) Send the suppliedNotificationusing the wrappedModelMBeaninstance.
-
Constructor Details
-
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 Details
-
sendNotification
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
-