|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.jmx.export.notification.ModelMBeanNotificationPublisher
public class ModelMBeanNotificationPublisher
NotificationPublisher implementation that uses the infrastructure
provided by the ModelMBean interface to track
javax.management.NotificationListeners
and send Notifications to those listeners.
ModelMBeanNotificationBroadcaster,
NotificationPublisherAware| Field Summary | |
|---|---|
private java.lang.Object |
managedResource
The managed resource associated with the modelMBean. |
private javax.management.modelmbean.ModelMBeanNotificationBroadcaster |
modelMBean
The ModelMBean instance wrapping the managed resource into which this
NotificationPublisher will be injected. |
private javax.management.ObjectName |
objectName
The ObjectName associated with the modelMBean. |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
private void |
replaceNotificationSourceIfNecessary(javax.management.Notification notification)
From the javadoc: |
void |
sendNotification(javax.management.Notification notification)
Send the supplied Notification using the wrapped
ModelMBean instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final javax.management.modelmbean.ModelMBeanNotificationBroadcaster modelMBean
ModelMBean instance wrapping the managed resource into which this
NotificationPublisher will be injected.
private final javax.management.ObjectName objectName
ObjectName associated with the modelMBean.
private final java.lang.Object managedResource
modelMBean.
| Constructor Detail |
|---|
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 nullobjectName - the ObjectName of the source ModelMBeanmanagedResource - the managed resource exposed by the supplied ModelMBean
java.lang.IllegalArgumentException - if any of the parameters is null| Method Detail |
|---|
public void sendNotification(javax.management.Notification notification)
Notification using the wrapped
ModelMBean instance.
sendNotification in interface NotificationPublishernotification - the Notification to be sent
java.lang.IllegalArgumentException - if the supplied notification is null
UnableToSendNotificationException - if the supplied notification could not be sentprivate void replaceNotificationSourceIfNecessary(javax.management.Notification notification)
javadoc:
"It is strongly recommended that notification senders use the object name rather than a reference to the MBean object as the source."
notification - the Notification whose
EventObject.getSource() might need massaging
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||