void sendNotification(Notification notification) {
if (notification == null) {
return;
}
List<ListenerInfo> currentList;
synchronized (listenerLock) {
currentList = listenerList;
}
final int size = currentList.size();
for (int i = 0; i < size; i++) {
ListenerInfo li = currentList.get(i);
if (li.filter == null
|| li.filter.isNotificationEnabled(notification)) {
try {
li.listener.handleNotification(notification, li.handback);
} catch (Exception e) {
e.printStackTrace();
throw new AssertionError("Error in invoking listener");
}
}
}
}
NotificationEmitterSupport.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:jdk8u-jdk
作者:
评论列表
文章目录