code: public synchronized void stop(boolean interruptHandlers) {
      LOG.info("Stopping server on " + port);
      
      if (!interruptHandlers) {
        // keep responder working
        responder.responderExtension = true;
        // do not purge connections in listener
        listener.cleanConnectionsAfterShutdown = false;
      } else {
        responder.interrupt();
      }
      
      running = false;
      if (interruptHandlers && handlers != null) {
        for (int i = 0; i < handlerCount; i++) {
          if (handlers[i] != null) {
            handlers[i].interrupt();
          }
        }
      }
  
      listener.interrupt();
      listener.doStop();
      notifyAll();
      if (this.rpcMetrics != null) {
        this.rpcMetrics.shutdown();
      }
    }
docs: Stops the service.  No new calls will be handled after this is called.