Interface NotificationPublisher
- All Known Implementing Classes:
ModelMBeanNotificationPublisher
public interface NotificationPublisher
Simple interface allowing Spring-managed MBeans to publish JMX notifications without being aware of how those notifications are being transmitted to theMBeanServer.Managed resources can access a
NotificationPublisherby implementing theNotificationPublisherAwareinterface. After a particular managed resource instance is registered with theMBeanServer, Spring will inject aNotificationPublisherinstance into it if that resource implements theNotificationPublisherAwareinteface.Each managed resource instance will have a distinct instance of a
NotificationPublisherimplementation. This instance will keep track of all theNotificationListenersregistered for a particular mananaged resource.Any existing, user-defined MBeans should use standard JMX APIs for notification publication; this interface is intended for use only by Spring-created MBeans.
- Since:
- 2.0
- Author:
- Rob Harrop
- See Also:
NotificationPublisherAware,MBeanExporter
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsendNotification(Notification notification)Send the specifiedNotificationto all registeredNotificationListeners.
Method Detail
sendNotification
void sendNotification(Notification notification) throws UnableToSendNotificationException
Send the specifiedNotificationto all registeredNotificationListeners. Managed resources are not responsible for managing the list of registeredNotificationListeners; that is performed automatically.- Parameters:
notification- the JMX Notification to send- Throws:
UnableToSendNotificationException- if sending failed