public class

NotificationListenerHolder

extends Object
java.lang.Object
   ↳ org.springframework.jmx.support.NotificationListenerHolder
Known Direct Subclasses

Class Overview

Helper class that aggregates a javax.management.NotificationListener, a javax.management.NotificationFilter, and an arbitrary handback object, as well as the names of MBeans from which the listener wishes to receive javax.management.Notification Notifications.

Summary

Fields
protected Set<Object> mappedObjectNames
Public Constructors
NotificationListenerHolder()
Public Methods
boolean equals(Object other)
Object getHandback()
Return the (arbitrary) object that will be 'handed back' as-is by an javax.management.NotificationBroadcaster when notifying any javax.management.NotificationListener.
NotificationFilter getNotificationFilter()
Return the NotificationFilter associated with the encapsulated NotificationFilter.
NotificationListener getNotificationListener()
ObjectName[] getResolvedObjectNames()
Return the list of ObjectName String representations for which the encapsulated NotificationFilter will be registered as a listener for javax.management.Notification Notifications.
int hashCode()
void setHandback(Object handback)
Set the (arbitrary) object that will be 'handed back' as-is by an javax.management.NotificationBroadcaster when notifying any NotificationListener.
void setMappedObjectName(Object mappedObjectName)
Set the ObjectName-style name of the single MBean that the encapsulated NotificationFilter will be registered with to listen for javax.management.Notification Notifications.
void setMappedObjectNames(Object[] mappedObjectNames)
Set an array of ObjectName-style names of the MBeans that the encapsulated NotificationFilter will be registered with to listen for javax.management.Notification Notifications.
void setNotificationFilter(NotificationFilter notificationFilter)
Set the NotificationFilter associated with the encapsulated NotificationFilter.
void setNotificationListener(NotificationListener notificationListener)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected Set<Object> mappedObjectNames

Public Constructors

public NotificationListenerHolder ()

Public Methods

public boolean equals (Object other)

public Object getHandback ()

Return the (arbitrary) object that will be 'handed back' as-is by an javax.management.NotificationBroadcaster when notifying any javax.management.NotificationListener.

Returns
  • the handback object (may be null)

public NotificationFilter getNotificationFilter ()

Return the NotificationFilter associated with the encapsulated NotificationFilter.

May be null.

public NotificationListener getNotificationListener ()

public ObjectName[] getResolvedObjectNames ()

Return the list of ObjectName String representations for which the encapsulated NotificationFilter will be registered as a listener for javax.management.Notification Notifications.

Throws
MalformedObjectNameException if an ObjectName is malformed

public int hashCode ()

public void setHandback (Object handback)

Set the (arbitrary) object that will be 'handed back' as-is by an javax.management.NotificationBroadcaster when notifying any NotificationListener.

Parameters
handback the handback object (can be null)

public void setMappedObjectName (Object mappedObjectName)

Set the ObjectName-style name of the single MBean that the encapsulated NotificationFilter will be registered with to listen for javax.management.Notification Notifications. Can be specified as ObjectName instance or as String.

public void setMappedObjectNames (Object[] mappedObjectNames)

Set an array of ObjectName-style names of the MBeans that the encapsulated NotificationFilter will be registered with to listen for javax.management.Notification Notifications. Can be specified as ObjectName instances or as Strings.

public void setNotificationFilter (NotificationFilter notificationFilter)

Set the NotificationFilter associated with the encapsulated NotificationFilter.

May be null.

public void setNotificationListener (NotificationListener notificationListener)