/**
* If the handback object passed is an AgentImpl, updates the JMX client count
*
* @param notification JMXConnectionNotification for change in client connection status
* @param handback An opaque object which helps the listener to associate information regarding
* the MBean emitter. This object is passed to the MBean during the addListener call and
* resent, without modification, to the listener. The MBean object should not use or modify
* the object. (NOTE: copied from javax.management.NotificationListener)
*/
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "BC_UNCONFIRMED_CAST",
justification = "Only JMXConnectionNotification instances are used.")
public void handleNotification(Notification notification, Object handback) {
if (handback instanceof AgentImpl) {
AgentImpl agent = (AgentImpl) handback;
JMXConnectionNotification jmxNotifn = (JMXConnectionNotification) notification;
if (logger.isDebugEnabled()) {
logger.debug("Connection notification for connection id : '{}'",
jmxNotifn.getConnectionId());
}
agent.updateRmiClientsCount();
}
}
AgentImpl.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:monarch
作者:
评论列表
文章目录