Class Http2Route

java.lang.Object
io.helidon.webserver.http2.Http2Route
All Implemented Interfaces:
HttpRoute, Route, ServerLifecycle

public class Http2Route extends Object implements HttpRoute
A route for HTTP/2 only. To create a route valid for any version of HTTP, please use HttpRoute or methods defined on HttpRouting.Builder.
  • Method Details

    • route

      public static Http2Route route(Method method, String path, Handler handler)
      Create a new HTTP/2 only route.
      Parameters:
      method - method to handle
      path - path pattern
      handler - handler
      Returns:
      a new route
    • accepts

      public PathMatchers.MatchResult accepts(HttpPrologue prologue)
      Description copied from interface: HttpRoute
      Whether this route accept the provided request.
      Specified by:
      accepts in interface HttpRoute
      Parameters:
      prologue - prologue of the request
      Returns:
      result of the validation
      See Also:
    • handler

      public Handler handler()
      Description copied from interface: HttpRoute
      Handler of this route.
      Specified by:
      handler in interface HttpRoute
      Returns:
      handler
    • beforeStart

      public void beforeStart()
      Description copied from interface: ServerLifecycle
      Before server start. If this method throws an exception, server startup fails and the server attempts startup cleanup.
      Specified by:
      beforeStart in interface ServerLifecycle
    • afterStop

      public void afterStop()
      Description copied from interface: ServerLifecycle
      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.
      Specified by:
      afterStop in interface ServerLifecycle
    • pathMatcher

      public Optional<PathMatcher> pathMatcher()
      Description copied from interface: HttpRoute
      Path matcher for this HTTP route.
      Specified by:
      pathMatcher in interface HttpRoute
      Returns:
      optional path matcher