code: public void stop() throws Exception {
      // close all connectors and release all binding ports
      for (Connector connector : mServer.getConnectors()) {
        connector.stop();
      }
  
      mServer.stop();
    }
docs: Shuts down the web server.