code: @Override
      protected void shutDown() throws Exception {
          long traceId = LoggerHelpers.traceEnterWithContext(log, this.objectId, "shutDown");
          try {
              log.info("Stopping REST server listening on port: {}", this.restServerConfig.getPort());
              final GrizzlyFuture<HttpServer> shutdown = httpServer.shutdown(30, TimeUnit.SECONDS);
              log.info("Awaiting termination of REST server");
              shutdown.get();
              log.info("REST server terminated");
          } finally {
              LoggerHelpers.traceLeave(log, this.objectId, "shutDown", traceId);
          }
      }
docs: Gracefully stop REST service.