public void handleNotification(Notification n, Object h) {
/* Connectors can handle unserializable notifications in
one of two ways. Either they can arrange for the
client to get a NotSerializableException from its
fetchNotifications call (RMI connector), or they can
replace the unserializable notification by a
JMXConnectionNotification.NOTIFS_LOST (JMXMP
connector). The former case is handled by code within
the connector client which will end up sending a
NOTIFS_LOST to our LostListener. The logic here
handles the latter case by converting it into the
former.
*/
if (n instanceof JMXConnectionNotification
&& n.getType().equals(JMXConnectionNotification.NOTIFS_LOST)) {
lostListener.handleNotification(n, h);
return;
}
synchronized (result) {
if (!n.getType().equals("interesting")
|| !n.getUserData().equals("known")) {
System.out.println("TestListener received strange notif: "
+ notificationString(n));
result.failed = true;
result.notifyAll();
} else {
result.knownCount++;
if (result.knownCount == NNOTIFS)
result.notifyAll();
}
}
}
MissingClassTest.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录