BaseNotificationBroadcaster.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:tomcat7 作者:
/**
 * Remove a notification event listener from this MBean.
 *
 * @param listener The listener to be removed (any and all registrations
 *  for this listener will be eliminated)
 *
 * @exception ListenerNotFoundException if this listener is not
 *  registered in the MBean
 */
@Override
public void removeNotificationListener(NotificationListener listener)
    throws ListenerNotFoundException {

    synchronized (entries) {
        Iterator<BaseNotificationBroadcasterEntry> items =
            entries.iterator();
        while (items.hasNext()) {
            BaseNotificationBroadcasterEntry item = items.next();
            if (item.listener == listener)
                items.remove();
        }
    }

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号