public class NotificationListenerHolder extends Object
NotificationListener
,
a NotificationFilter
, and an arbitrary handback
object, as well as the names of MBeans from which the listener wishes
to receive Notifications
.NotificationListenerBean
,
NotificationListenerRegistrar
Modifier and Type | Field and Description |
---|---|
protected Set<Object> |
mappedObjectNames |
Constructor and Description |
---|
NotificationListenerHolder() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
Object |
getHandback()
Return the (arbitrary) object that will be 'handed back' as-is by an
NotificationBroadcaster when notifying
any NotificationListener . |
NotificationFilter |
getNotificationFilter()
Return the
NotificationFilter associated
with the encapsulated NotificationListener . |
NotificationListener |
getNotificationListener()
Get the
NotificationListener . |
ObjectName[] |
getResolvedObjectNames()
Return the list of
ObjectName String representations for
which the encapsulated NotificationFilter will
be registered as a listener for Notifications . |
int |
hashCode() |
void |
setHandback(Object handback)
Set the (arbitrary) object that will be 'handed back' as-is by an
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 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 Notifications . |
void |
setNotificationFilter(NotificationFilter notificationFilter)
Set the
NotificationFilter associated
with the encapsulated NotificationFilter . |
void |
setNotificationListener(NotificationListener notificationListener)
Set the
NotificationListener . |
public void setNotificationListener(@Nullable NotificationListener notificationListener)
NotificationListener
.@Nullable public NotificationListener getNotificationListener()
NotificationListener
.public void setNotificationFilter(@Nullable NotificationFilter notificationFilter)
@Nullable public NotificationFilter getNotificationFilter()
public void setHandback(@Nullable Object handback)
NotificationBroadcaster
when notifying
any NotificationListener
.handback
- the handback object (can be null
)NotificationListener.handleNotification(javax.management.Notification, Object)
@Nullable public Object getHandback()
NotificationBroadcaster
when notifying
any NotificationListener
.null
)NotificationListener.handleNotification(javax.management.Notification, Object)
public void setMappedObjectName(@Nullable Object mappedObjectName)
ObjectName
-style name of the single MBean
that the encapsulated NotificationFilter
will be registered with to listen for Notifications
.
Can be specified as ObjectName
instance or as String
.public void setMappedObjectNames(Object... mappedObjectNames)
ObjectName
-style names of the MBeans
that the encapsulated NotificationFilter
will be registered with to listen for Notifications
.
Can be specified as ObjectName
instances or as String
s.setMappedObjectName(java.lang.Object)
@Nullable public ObjectName[] getResolvedObjectNames() throws MalformedObjectNameException
ObjectName
String representations for
which the encapsulated NotificationFilter
will
be registered as a listener for Notifications
.MalformedObjectNameException
- if an ObjectName
is malformed