code: public void shutdown(ShutdownModeAmp mode)
    {
      Thread thread = Thread.currentThread();
      ClassLoader oldLoader = thread.getContextClassLoader();
  
      try {
        thread.setContextClassLoader(classLoader());
  
        if (! _lifecycle.toStopping()) {
          return;
        }
        
        //_httpCache.close();
  
        try {
          shutdownImpl(mode);
        } catch (Throwable e) {
          log.log(Level.WARNING, e.toString(), e);
        }
  
        _lifecycle.toDestroy();
      } finally {
        thread.setContextClassLoader(oldLoader);
      }
    }
docs: Closes the server.
  @param mode