/**
* Removes a listener for Notifications from the RequiredModelMBean.
*
* @param listener The listener name which was handling notifications
* emitted by the registered MBean.
* This method will remove all information related to this listener.
*
* @exception ListenerNotFoundException The listener is not registered
* in the MBean or is null.
*
* @see #addNotificationListener
**/
public void removeNotificationListener(NotificationListener listener)
throws ListenerNotFoundException {
if (listener == null)
throw new ListenerNotFoundException(
"Notification listener is null");
if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
MODELMBEAN_LOGGER.log(Level.TRACE, "Entry");
}
if (generalBroadcaster == null)
throw new ListenerNotFoundException(
"No notification listeners registered");
generalBroadcaster.removeNotificationListener(listener);
if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
MODELMBEAN_LOGGER.log(Level.TRACE, "Exit");
}
}
RequiredModelMBean.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录