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 TypeMethodDescriptionboolean Return 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(@Nullable Object handback) set the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcasterwhen notifying anyNotificationListener.voidsetMappedObjectName(@Nullable 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(@Nullable NotificationFilter notificationFilter) set theNotificationFilterassociated with the encapsulatedNotificationFilter.voidsetNotificationListener(@Nullable NotificationListener notificationListener) set theNotificationListener.
-
Field Details
-
mappedObjectNames
-
-
Constructor Details
-
NotificationListenerHolder
public NotificationListenerHolder()
-
-
Method Details
-
setNotificationListener
public void setNotificationListener(@Nullable NotificationListener notificationListener) 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.- see Also:
-
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
public ObjectName @Nullable [] getResolvedObjectNames() throws MalformedObjectNameExceptionReturn the list ofObjectNamestring representations for which the encapsulatedNotificationFilterwill be registered as a listener forNotifications.- Throws:
MalformedObjectNameException- if anObjectNameis malformed
-
equals
-
hashCode
-