Interface ServerLifecycle

All Known Subinterfaces:
Filter, Handler, HttpFeature, HttpRoute, HttpRouting, HttpService, HttpServiceLocator, JsonRpcErrorHandler, JsonRpcExceptionHandler, JsonRpcHandler, JsonRpcService, ProtocolUpgradeHandler, Route, Routing
All Known Implementing Classes:
AccessLogRoutingFeature, DisabledObserverFeature, Filters, GraphQlService, GrpcRouting, Http1Route, Http2Route, JsonRpcRouting, OidcFeature, SecureHandler, SecurityHandler, SecurityHttpFeature, WsRoute, WsRouting

public interface ServerLifecycle
Basic server lifecycle operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    afterStart(WebServer webServer)
    After server start.
    default void
    After server stop.
    default void
    Before server start.
  • Method Details

    • beforeStart

      default void beforeStart()
      Before server start. If this method throws an exception, server startup fails and the server attempts startup cleanup.
    • afterStart

      default void afterStart(WebServer webServer)
      After server start. If this method throws an exception, server startup fails and the server attempts startup cleanup.
      Parameters:
      webServer - the WebServer that was started
    • afterStop

      default void afterStop()
      After server stop. Exceptions thrown by this method fail WebServer.stop() after listener cleanup has been attempted. If this method is invoked during startup cleanup, exceptions may fail WebServer.start(). If this method is invoked during suspend or resume failure cleanup, exceptions may be suppressed on the original suspend or resume failure.