java.lang.Object
io.helidon.webserver.Http1Route
io.helidon.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
Modifier and TypeFieldDescriptionstatic final PathMatcher
Path matcher for routing which doesn't specify any other path matcher. -
Method Summary
Modifier and TypeMethodDescriptiondefault Set<Http.RequestMethod>
Gets all acceptedHTTP methods
or empty set if accepts ANY method ornull
if no method (not a method based route).boolean
accepts
(Http.RequestMethod method) default boolean
accepts
(Http.RequestMethod method) Returnstrue
if this record accepts provided method.handler()
Returns an effectiveHandler
.match
(CharSequence path) Matches this against a URI path.boolean
matchVersion
(Http.Version version) HTTP protocol version supported by the route.static Http2Route
route
(Http.Method method, String path, Handler handler) Create an HTTP/2 specific route.static Http2Route
route
(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, wait
Methods inherited from interface io.helidon.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 aremaining
forprefixMatch
is whole tested path.
-
-
Method Details
-
matchVersion
Description copied from interface:HttpRoute
HTTP protocol version supported by the route.- Specified by:
matchVersion
in interfaceHttpRoute
- Overrides:
matchVersion
in 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
- HTTPmethods
handled by this route- Returns:
- a new HTTP/2 specific route
-
acceptedMethods
Gets all acceptedHTTP methods
or empty set if accepts ANY method ornull
if no method (not a method based route).- Returns:
- accepted methods.
-
accepts
Returnstrue
if this record accepts provided method.- Parameters:
method
- An HTTP method.- Returns:
true
if this record accepts provided method.
-
acceptedMethods
-
accepts
-
handler
Returns an effectiveHandler
.- Returns:
- an request / response handler.
-
diagnosticEvent
-
match
Matches this against a URI path. Drops any path parameters before matching.- Parameters:
path
- resolved and normalized URI path to test against.- Returns:
- a
PathMatcher.Result
of the test. - Throws:
NullPointerException
- in case thatpath
parameter isnull
.
-
toString
-