docs: public ReturnCode stop() {
          System.out.println(MessageFormat.format(BootstrapConstants.messages.getString("info.serverStopping"), serverName));
  
          // Use initialized bootstrap configuration to find the server lock file.
          ServerLock serverLock = ServerLock.createTestLock(bootProps);
  
          // we can not pre-test the server: on some platforms, the server lock file
          // can be deleted, which means waiting to see if it is there leads to
          // an abandoned server.
          ReturnCode stopRc = ReturnCode.STOP_ACTION;
  
          // The lock file may have been (erroneously) deleted: this can happen on linux
          boolean lockExists = serverLock.lockFileExists();
  
          if (lockExists) {
              // If the lock exists, check quickly to see if the process is holding it.
              if (serverLock.testServerRunning()) {
                  // we need to tell the server to stop...
                  ServerCommandClient scc = new ServerCommandClient(bootProps);
  
                  if (scc.isValid()) {
                      stopRc = scc.stopServer(launchArgs.getOption("force") != null);
                  } else {
                      // we can't communicate to the server...
                      stopRc = ReturnCode.ERROR_SERVER_STOP;
                  }
              } else {
                  // nope: lock not held, we're already stopped
                  stopRc = ReturnCode.REDUNDANT_ACTION_STATUS;
              }
          } else {
              // no lock file: we assume the server is not running, we have nothing to do.
              stopRc = ReturnCode.REDUNDANT_ACTION_STATUS;
          }
  
          // If the lock file existed before we attempted to stop the server,
          // wait until we can obtain the server lock file (because the server process has stopped)
          if (stopRc == ReturnCode.OK && lockExists) {
              stopRc = serverLock.waitForStop();
          }
  
          if (stopRc == ReturnCode.OK) {
              String pid = getPID();
              if (pid != null) {
                  stopRc = waitForProcessStop(pid);
              }
          }
  
          if (stopRc == ReturnCode.OK) {
              System.out.println(MessageFormat.format(BootstrapConstants.messages.getString("info.serverStopped"), serverName));
          } else if (stopRc == ReturnCode.REDUNDANT_ACTION_STATUS) {
              System.out.println(MessageFormat.format(BootstrapConstants.messages.getString("info.serverNotRunning"), serverName));
          } else if (stopRc == ReturnCode.SERVER_COMMAND_PORT_DISABLED_STATUS) {
              System.out.println(MessageFormat.format(BootstrapConstants.messages.getString("error.serverStopCommandPortDisabled"), serverName));
          } else {
              System.out.println(MessageFormat.format(BootstrapConstants.messages.getString("info.serverStopException"), serverName));
          }
  
          return stopRc;
      }