List of usage examples for javax.management.remote JMXConnectionNotification getConnectionId
public String getConnectionId()
The connection ID to which this notification pertains.
From source file:org.apache.geode.admin.jmx.internal.AgentImpl.java
/** * 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) *//*ww w. java2s .c o m*/ @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(); } }