Package org.springframework.jmx.support
Class NotificationListenerHolder
java.lang.Object
org.springframework.jmx.support.NotificationListenerHolder
- Direct Known Subclasses:
NotificationListenerBean,NotificationListenerRegistrar
Helper class that aggregates a
NotificationListener,
a NotificationFilter, and an arbitrary handback
object, as well as the names of MBeans from which the listener wishes
to receive Notifications.- Since:
- 2.5.2
- Author:
- Juergen Hoeller
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcasterwhen notifying anyNotificationListener.Return theNotificationFilterassociated with the encapsulatedNotificationListener.Get theNotificationListener.Return the list ofObjectNameString representations for which the encapsulatedNotificationFilterwill be registered as a listener forNotifications.inthashCode()voidsetHandback(Object handback) Set the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcasterwhen notifying anyNotificationListener.voidsetMappedObjectName(Object mappedObjectName) Set theObjectName-style name of the single MBean that the encapsulatedNotificationFilterwill be registered with to listen forNotifications.voidsetMappedObjectNames(Object... mappedObjectNames) Set an array ofObjectName-style names of the MBeans that the encapsulatedNotificationFilterwill be registered with to listen forNotifications.voidsetNotificationFilter(NotificationFilter notificationFilter) Set theNotificationFilterassociated with the encapsulatedNotificationFilter.voidsetNotificationListener(NotificationListener notificationListener) Set theNotificationListener.
-
Field Details
-
mappedObjectNames
-
-
Constructor Details
-
NotificationListenerHolder
public NotificationListenerHolder()
-
-
Method Details
-
setNotificationListener
Set theNotificationListener. -
getNotificationListener
Get theNotificationListener. -
setNotificationFilter
-
getNotificationFilter
-
setHandback
Set the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcasterwhen notifying anyNotificationListener.- Parameters:
handback- the handback object (can benull)- See Also:
-
getHandback
Return the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcasterwhen notifying anyNotificationListener.- Returns:
- the handback object (may be
null) - See Also:
-
setMappedObjectName
Set theObjectName-style name of the single MBean that the encapsulatedNotificationFilterwill be registered with to listen forNotifications. Can be specified asObjectNameinstance or asString. -
setMappedObjectNames
Set an array ofObjectName-style names of the MBeans that the encapsulatedNotificationFilterwill be registered with to listen forNotifications. Can be specified asObjectNameinstances or asStrings.- See Also:
-
getResolvedObjectNames
Return the list ofObjectNameString representations for which the encapsulatedNotificationFilterwill be registered as a listener forNotifications.- Throws:
MalformedObjectNameException- if anObjectNameis malformed
-
equals
-
hashCode
public int hashCode()
-