Interface RouteStarter
- All Known Implementing Classes:
HttpPredicateRouterBuilder
public interface RouteStarter
Methods for starting a route.
-
Method Summary
Modifier and TypeMethodDescriptionBuilds theStreamingHttpService
that performs the configured routing.when
(BiPredicate<ConnectionContext, StreamingHttpRequest> predicate) Begin a route that matchesStreamingHttpRequest
andConnectionContext
with a user-specifiedpredicate
.when
(Predicate<StreamingHttpRequest> predicate) Begin a route that matchesStreamingHttpRequest
s with a user-specifiedpredicate
.whenCookie
(String name) whenHeader
(CharSequence name) Begin a route with aStringMultiValueMatcher
that matches against the value(s) of thename
headers.Begin a route that matches requests that are not over SSL/TLS.Begin a route that matches requests that are over SSL/TLS.whenMethod
(HttpRequestMethod method) Begin a route that matches requests where theHttpRequestMethod
ismethod
.whenMethodIsOneOf
(HttpRequestMethod... methods) Begin a route that matches requests where theHttpRequestMethod
is one of themethods
.whenPathEquals
(String path) Begin a route that matches requests where the path is equal topath
.whenPathIsOneOf
(String... paths) Begin a route that matches requests where the path is equal to any of the specifiedpath
s.whenPathMatches
(String pathRegex) Begin a route that matches requests where the path matches the regexpathRegex
.whenPathMatches
(Pattern pathRegex) Begin a route that matches requests where the path matches the regexpathRegex
.whenPathStartsWith
(String pathPrefix) Begin a route that matches requests where the path starts withpathPrefix
.whenQueryParam
(String name) Begin a route with aStringMultiValueMatcher
that matches against the value(s) of the request parametername
.
-
Method Details
-
whenMethod
Begin a route that matches requests where theHttpRequestMethod
ismethod
.- Parameters:
method
- the method to match.- Returns:
RouteContinuation
for the next steps of building a route.
-
whenMethodIsOneOf
Begin a route that matches requests where theHttpRequestMethod
is one of themethods
.- Parameters:
methods
- the methods to match.- Returns:
RouteContinuation
for the next steps of building a route.
-
whenPathEquals
Begin a route that matches requests where the path is equal topath
.- Parameters:
path
- the path to match.- Returns:
RouteContinuation
for the next steps of building a route.
-
whenPathIsOneOf
Begin a route that matches requests where the path is equal to any of the specifiedpath
s.- Parameters:
paths
- the paths to match.- Returns:
RouteContinuation
for the next steps of building a route.
-
whenPathStartsWith
Begin a route that matches requests where the path starts withpathPrefix
.- Parameters:
pathPrefix
- the path prefix to match.- Returns:
RouteContinuation
for the next steps of building a route.
-
whenPathMatches
Begin a route that matches requests where the path matches the regexpathRegex
.- Parameters:
pathRegex
- the regex to match against the request path.- Returns:
RouteContinuation
for the next steps of building a route.
-
whenPathMatches
Begin a route that matches requests where the path matches the regexpathRegex
.- Parameters:
pathRegex
- the regex to match against the request path.- Returns:
RouteContinuation
for the next steps of building a route.
-
whenQueryParam
Begin a route with aStringMultiValueMatcher
that matches against the value(s) of the request parametername
.- Parameters:
name
- the request parameter name that must be present in the request in order to continue evaluation of this route.- Returns:
StringMultiValueMatcher
for the next steps of building a route.
-
whenHeader
Begin a route with aStringMultiValueMatcher
that matches against the value(s) of thename
headers.- Parameters:
name
- The header name that must be present in the request in order to continue evaluation of this route.- Returns:
StringMultiValueMatcher
for the next steps of building a route.
-
whenCookie
- Parameters:
name
- the cookie name that must be present in the request in order to continue evaluation of this route.- Returns:
CookieMatcher
for the next steps of building a route.
-
whenIsSsl
RouteContinuation whenIsSsl()Begin a route that matches requests that are over SSL/TLS.- Returns:
RouteContinuation
for the next steps of building a route.
-
whenIsNotSsl
RouteContinuation whenIsNotSsl()Begin a route that matches requests that are not over SSL/TLS.- Returns:
RouteContinuation
for the next steps of building a route.
-
when
Begin a route that matchesStreamingHttpRequest
s with a user-specifiedpredicate
.- Parameters:
predicate
- the predicate to evaluate against requests.- Returns:
RouteContinuation
for the next steps of building a route.
-
when
Begin a route that matchesStreamingHttpRequest
andConnectionContext
with a user-specifiedpredicate
.- Parameters:
predicate
- the predicate to evaluate against the request and connection context.- Returns:
RouteContinuation
for the next steps of building a route.
-
buildStreaming
StreamingHttpService buildStreaming()Builds theStreamingHttpService
that performs the configured routing.- Returns:
- the router
StreamingHttpService
.
-