code: @Override
      public void stop() {
          // Run jersey shutdown lifecycle
          if (container != null) {
              container.stop();
              container = null;
          }
          // Destroy the jersey service locator
          if (jerseyHandler != null && jerseyHandler.getDelegate() != null) {
              ServiceLocatorFactory.getInstance().destroy(jerseyHandler.getDelegate().getServiceLocator());
              jerseyHandler = null;
          }
          if (server != null) {
              server.close();
              server = null;
          }
      }
docs: Shutdown jersey server and release resources