Interface HttpRoute
- All Superinterfaces:
Route, ServerLifecycle
- All Known Implementing Classes:
Http1Route, Http2Route
A basic HTTP route (should be usable by ANY HTTP protocol version).
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionaccepts(HttpPrologue prologue) Whether this route accept the provided request.default PathMatchers.MatchResultaccepts(HttpPrologue prologue, ServerRequestHeaders headers) Whether this route accept the provided request.static HttpRoute.Builderbuilder()Builder to build a new HTTP route.handler()Handler of this route.default Optional<PathMatcher> Path matcher for this HTTP route.Methods inherited from interface ServerLifecycle
afterStart, afterStop, beforeStartModifier and TypeMethodDescriptiondefault voidafterStart(WebServer webServer) After server start.default voidAfter server stop.default voidBefore server start.
-
Method Details
-
builder
-
accepts
Whether this route accept the provided request.- Parameters:
prologue- prologue of the request- Returns:
- result of the validation
- See Also:
-
accepts
Whether this route accept the provided request.- Parameters:
prologue- prologue of the requestheaders- headers of the request- Returns:
- result of the validation
- See Also:
-
handler
-
pathMatcher
Path matcher for this HTTP route.- Returns:
- optional path matcher
-