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
ConstructorDescriptionModelMBeanNotificationPublisher
(ModelMBeanNotificationBroadcaster modelMBean, ObjectName objectName, Object managedResource) Create a new instance of theModelMBeanNotificationPublisher
class that will publish allNotifications
to the suppliedModelMBean
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
sendNotification
(Notification notification) Send the suppliedNotification
using the wrappedModelMBean
instance.
-
Constructor Details
-
ModelMBeanNotificationPublisher
public ModelMBeanNotificationPublisher(ModelMBeanNotificationBroadcaster modelMBean, ObjectName objectName, Object managedResource) Create a new instance of theModelMBeanNotificationPublisher
class that will publish allNotifications
to the suppliedModelMBean
.- Parameters:
modelMBean
- the targetModelMBean
; must not benull
objectName
- theObjectName
of the sourceModelMBean
managedResource
- the managed resource exposed by the suppliedModelMBean
- Throws:
IllegalArgumentException
- if any of the parameters isnull
-
-
Method Details
-
sendNotification
Send the suppliedNotification
using the wrappedModelMBean
instance.- Specified by:
sendNotification
in interfaceNotificationPublisher
- Parameters:
notification
- theNotification
to be sent- Throws:
IllegalArgumentException
- if the suppliednotification
isnull
UnableToSendNotificationException
- if the suppliednotification
could not be sent
-