code: public void disconnect() {
          if (LOG.isDebugEnabled()) {
              LOG.debug("Disconnecting client for session: 0x"
                      + Long.toHexString(getSessionId()));
          }
  
          sendThread.close();
          eventThread.queueEventOfDeath();
      }
docs: Shutdown the send/event threads. This method should not be called
  directly - rather it should be called as part of close operation. This
  method is primarily here to allow the tests to verify disconnection
  behavior.