Class Http2Route
java.lang.Object
io.helidon.reactive.webserver.Http1Route
io.helidon.reactive.webserver.http2.Http2Route
- All Implemented Interfaces:
HttpRoute,ServerLifecycle
A route for HTTP/2 only.
To create a route valid for any version of HTTP, please use
HttpRoute.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PathMatcherPath matcher for routing which doesn't specify any other path matcher. -
Method Summary
Modifier and TypeMethodDescriptiondefault Set<Http.Method>Gets all acceptedHTTP methodsor empty set if accepts ANY method ornullif no method (not a method based route).booleanaccepts(Http.Method method) default booleanaccepts(Http.Method method) Returnstrueif this record accepts provided method.handler()Returns an effectiveHandler.booleanmatchVersion(Http.Version version) HTTP protocol version supported by the route.static Http2Routeroute(Http.Method method, String path, Handler handler) Create an HTTP/2 specific route.static Http2Routeroute(PathMatcher pathMatcher, Handler handler, Http.Method... methods) Create an HTTP/2 specific route.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.reactive.webserver.ServerLifecycle
afterStop, beforeStart
-
Field Details
-
EMPTY_PATH_MATCHER
Path matcher for routing which doesn't specify any other path matcher. Matcher accepts ANY path and aremainingforprefixMatchis whole tested path.
-
-
Method Details
-
matchVersion
Description copied from interface:HttpRouteHTTP protocol version supported by the route.- Specified by:
matchVersionin interfaceHttpRoute- Overrides:
matchVersionin classHttp1Route- Parameters:
version- HTTP protocol version supported by the route- Returns:
- true if supported
-
route
Create an HTTP/2 specific route.- Parameters:
method- accepted methodpath- path patternhandler- handler- Returns:
- a new HTTP/2.0 specific route
-
route
Create an HTTP/2 specific route.- Parameters:
pathMatcher- URI Path Matcherhandler- handlermethods- HTTPmethodshandled by this route- Returns:
- a new HTTP/2 specific route
-
acceptedMethods
Gets all acceptedHTTP methodsor empty set if accepts ANY method ornullif no method (not a method based route).- Returns:
- accepted methods.
-
accepts
Returnstrueif this record accepts provided method.- Parameters:
method- An HTTP method.- Returns:
trueif this record accepts provided method.
-
acceptedMethods
-
accepts
-
handler
Returns an effectiveHandler.- Returns:
- an request / response handler.
-
toString
-