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 TypeMethodDescriptionboolean
Return the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcaster
when notifying anyNotificationListener
.Return theNotificationFilter
associated with the encapsulatedNotificationListener
.Get theNotificationListener
.Return the list ofObjectName
String representations for which the encapsulatedNotificationFilter
will be registered as a listener forNotifications
.int
hashCode()
void
setHandback
(Object handback) Set the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcaster
when notifying anyNotificationListener
.void
setMappedObjectName
(Object mappedObjectName) Set theObjectName
-style name of the single MBean that the encapsulatedNotificationFilter
will be registered with to listen forNotifications
.void
setMappedObjectNames
(Object... mappedObjectNames) Set an array ofObjectName
-style names of the MBeans that the encapsulatedNotificationFilter
will be registered with to listen forNotifications
.void
setNotificationFilter
(NotificationFilter notificationFilter) Set theNotificationFilter
associated with the encapsulatedNotificationFilter
.void
setNotificationListener
(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 anNotificationBroadcaster
when notifying anyNotificationListener
.- Parameters:
handback
- the handback object (can benull
)- See Also:
-
getHandback
Return the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcaster
when notifying anyNotificationListener
.- Returns:
- the handback object (may be
null
) - See Also:
-
setMappedObjectName
Set theObjectName
-style name of the single MBean that the encapsulatedNotificationFilter
will be registered with to listen forNotifications
. Can be specified asObjectName
instance or asString
. -
setMappedObjectNames
Set an array ofObjectName
-style names of the MBeans that the encapsulatedNotificationFilter
will be registered with to listen forNotifications
. Can be specified asObjectName
instances or asString
s.- See Also:
-
getResolvedObjectNames
Return the list ofObjectName
String representations for which the encapsulatedNotificationFilter
will be registered as a listener forNotifications
.- Throws:
MalformedObjectNameException
- if anObjectName
is malformed
-
equals
-
hashCode
public int hashCode()
-