protected void doStop(ServiceStopper stopper) throws Exception {
   stopper.stop(asyncExecutors);
   stopper.stop(multiplexer);
   stopper.stop(multiplexer);
   stopper.stop(messageDistribution);
   stopper.stop(transportServer);
 }
  @Override
  public void stop() throws Exception {
    try {
      synchronized (reconnectMutex) {
        ServiceStopper ss = new ServiceStopper();

        if (!started) {
          return;
        }
        started = false;
        disposed = true;
        connected = false;

        for (Iterator<FanoutTransportHandler> iter = transports.iterator(); iter.hasNext(); ) {
          FanoutTransportHandler th = iter.next();
          if (th.transport != null) {
            ss.stop(th.transport);
          }
        }

        LOG.debug("Stopped: " + this);
        ss.throwFirstException();
      }
    } finally {
      reconnectTask.shutdown();
      reconnectTaskFactory.shutdownNow();
    }
  }