public void handleNotification(Notification n, Object hb) {
// treat the client notif to know the end
if (n instanceof JMXConnectionNotification) {
if (!JMXConnectionNotification.NOTIFS_LOST.equals(n.getType())) {
clientState = n.getType();
System.out.println(
">>> The client state has been changed to: "+clientState);
synchronized(lock) {
lock.notifyAll();
}
}
return;
}
System.out.println(">>> Do sleep to make reconnection.");
synchronized(lock) {
try {
lock.wait(listenerSleep);
} catch (Exception e) {
// OK
}
}
}
NotifReconnectDeadlockTest.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:jdk8u-jdk
作者:
评论列表
文章目录