public class NotificationListenerHolder
extends java.lang.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 java.util.Set<java.lang.Object> |
mappedObjectNames |
Constructor and Description |
---|
NotificationListenerHolder() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
java.lang.Object |
getHandback()
Return the (arbitrary) object that will be 'handed back' as-is by an
NotificationBroadcaster when notifying
any NotificationListener . |
javax.management.NotificationFilter |
getNotificationFilter()
Return the
NotificationFilter associated
with the encapsulated NotificationListener . |
javax.management.NotificationListener |
getNotificationListener()
Get the
NotificationListener . |
javax.management.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(java.lang.Object handback)
Set the (arbitrary) object that will be 'handed back' as-is by an
NotificationBroadcaster when notifying
any NotificationListener . |
void |
setMappedObjectName(java.lang.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(java.lang.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(javax.management.NotificationFilter notificationFilter)
Set the
NotificationFilter associated
with the encapsulated NotificationFilter . |
void |
setNotificationListener(javax.management.NotificationListener notificationListener)
Set the
NotificationListener . |
@Nullable protected java.util.Set<java.lang.Object> mappedObjectNames
public void setNotificationListener(@Nullable javax.management.NotificationListener notificationListener)
NotificationListener
.@Nullable public javax.management.NotificationListener getNotificationListener()
NotificationListener
.public void setNotificationFilter(@Nullable javax.management.NotificationFilter notificationFilter)
@Nullable public javax.management.NotificationFilter getNotificationFilter()
public void setHandback(@Nullable java.lang.Object handback)
NotificationBroadcaster
when notifying
any NotificationListener
.handback
- the handback object (can be null
)NotificationListener.handleNotification(javax.management.Notification, Object)
@Nullable public java.lang.Object getHandback()
NotificationBroadcaster
when notifying
any NotificationListener
.null
)NotificationListener.handleNotification(javax.management.Notification, Object)
public void setMappedObjectName(@Nullable java.lang.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(java.lang.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 javax.management.ObjectName[] getResolvedObjectNames() throws javax.management.MalformedObjectNameException
ObjectName
String representations for
which the encapsulated NotificationFilter
will
be registered as a listener for Notifications
.javax.management.MalformedObjectNameException
- if an ObjectName
is malformedpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object