@Override
  public void handleNotification(Notification notification, Object handback) {
    if (notification instanceof JMXConnectionNotification) {
      JMXConnectionNotification connNotif = (JMXConnectionNotification) notification;
      if (JMXConnectionNotification.CLOSED.equals(connNotif.getType())
          || JMXConnectionNotification.FAILED.equals(connNotif.getType())) {
        invoker.isConnected.set(false);
        invoker.resetClusterId();
        if (!invoker.isSelfDisconnect.get()) {
          Gfsh.getCurrentInstance().notifyDisconnect(invoker.toString());
        }
      }
    }
  }
A Connection Notification Listener. Notifies Gfsh when a connection gets terminated abruptly.

@since GemFire 7.0
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/shell/JmxOperationInvoker.java