类 NotificationListenerHolder
- java.lang.Object
- org.springframework.jmx.support.NotificationListenerHolder
public class NotificationListenerHolder extends Object
Helper class that aggregates aNotificationListener
, aNotificationFilter
, and an arbitrary handback object, as well as the names of MBeans from which the listener wishes to receiveNotifications
.- 从以下版本开始:
- 2.5.2
- 作者:
- Juergen Hoeller
- 另请参阅:
NotificationListenerBean
,NotificationListenerRegistrar
字段概要
字段 修饰符和类型 字段 说明 protected Set<Object>
mappedObjectNames
构造器概要
构造器 构造器 说明 NotificationListenerHolder()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
equals(Object other)
Object
getHandback()
Return the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcaster
when notifying anyNotificationListener
.NotificationFilter
getNotificationFilter()
Return theNotificationFilter
associated with the encapsulatedNotificationListener
.NotificationListener
getNotificationListener()
Get theNotificationListener
.ObjectName[]
getResolvedObjectNames()
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
.
字段详细资料
mappedObjectNames
protected Set<Object> mappedObjectNames
构造器详细资料
NotificationListenerHolder
public NotificationListenerHolder()
方法详细资料
setNotificationListener
public void setNotificationListener(NotificationListener notificationListener)
Set theNotificationListener
.
getNotificationListener
public NotificationListener getNotificationListener()
Get theNotificationListener
.
setNotificationFilter
public void setNotificationFilter(NotificationFilter notificationFilter)
getNotificationFilter
public NotificationFilter getNotificationFilter()
setHandback
public void setHandback(Object handback)
Set the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcaster
when notifying anyNotificationListener
.- 参数:
handback
- the handback object (can benull
)- 另请参阅:
NotificationListener.handleNotification(javax.management.Notification, Object)
getHandback
public Object getHandback()
Return the (arbitrary) object that will be 'handed back' as-is by anNotificationBroadcaster
when notifying anyNotificationListener
.- 返回:
- the handback object (may be
null
) - 另请参阅:
NotificationListener.handleNotification(javax.management.Notification, Object)
setMappedObjectName
public void setMappedObjectName(Object mappedObjectName)
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
public void setMappedObjectNames(Object[] mappedObjectNames)
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.
getResolvedObjectNames
public ObjectName[] getResolvedObjectNames() throws MalformedObjectNameException
Return the list ofObjectName
String representations for which the encapsulatedNotificationFilter
will be registered as a listener forNotifications
.- 抛出:
MalformedObjectNameException
- if anObjectName
is malformed