code: @Override
    public synchronized void stop() throws ApplicationException {
      if (!this.hasStarted) {
        LOG.warn("ApplicationLauncher was never started");
        return;
      }
      if (this.hasStopped) {
        LOG.warn("ApplicationLauncher has already stopped");
        return;
      }
      this.hasStopped = true;
  
      LOG.info("Shutting down the application");
      try {
        this.serviceManager.stopAsync().awaitStopped(this.stopTime, TimeUnit.SECONDS);
      } catch (TimeoutException te) {
        LOG.error("Timeout in stopping the service manager", te);
      }
    }
docs: Stops the {@link ApplicationLauncher} by stopping all associated services.