Interface RouteContinuation
public interface RouteContinuation
Methods for continuing a route.
-
Method Summary
Modifier and TypeMethodDescriptionand
(BiPredicate<ConnectionContext, StreamingHttpRequest> predicate) Extends the current route such that it matchesStreamingHttpRequest
andConnectionContext
with a user-specifiedpredicate
.and
(Predicate<StreamingHttpRequest> predicate) Extends the current route such that it matchesStreamingHttpRequest
s with a user-specifiedpredicate
.Extends the current route with aCookieMatcher
that matches againstHttpSetCookie
s with the namename
.andHeader
(CharSequence name) Extends the current route with aStringMultiValueMatcher
that matches against the value(s) of thename
headers.Extends the current route such that it matches requests that are not over SSL/TLS.andIsSsl()
Extends the current route such that it matches requests that are over SSL/TLS.andMethod
(HttpRequestMethod method) Extends the current route such that it matches requests where theHttpRequestMethod
ismethod
.andMethodIsOneOf
(HttpRequestMethod... methods) Extends the current route such that it matches requests where theHttpRequestMethod
is one of themethods
.andPathEquals
(String path) Extends the current route such that it matches requests where the path is equal topath
.andPathIsOneOf
(String... paths) Extends the current route such that it matches requests where the path is equal to any of the specifiedpath
s.andPathMatches
(String pathRegex) Extends the current route such that it matches requests where the path matches the regexpathRegex
.andPathMatches
(Pattern pathRegex) Extends the current route such that it matches requests where the path matches the regexpathRegex
.andPathStartsWith
(String pathPrefix) Extends the current route such that it matches requests where the path starts withpathPrefix
.andQueryParam
(String name) Extends the current route with aStringMultiValueMatcher
that matches against the value(s) of the request parametername
.executionStrategy
(HttpExecutionStrategy routeStrategy) Specifies anHttpExecutionStrategy
to be used for this route.thenRouteTo
(BlockingHttpService service) Completes the route by specifying theBlockingHttpService
to route requests to that match the previously specified criteria.thenRouteTo
(BlockingStreamingHttpService service) Completes the route by specifying theBlockingStreamingHttpService
to route requests to that match the previously specified criteria.thenRouteTo
(HttpService service) Completes the route by specifying theHttpService
to route requests to that match the previously specified criteria.thenRouteTo
(StreamingHttpService service) Completes the route by specifying theStreamingHttpService
to route requests to that match the previously specified criteria.
-
Method Details
-
andMethod
Extends the current route such that it matches requests where theHttpRequestMethod
ismethod
.- Parameters:
method
- the method to match.- Returns:
RouteContinuation
for the next steps of building a route.
-
andMethodIsOneOf
Extends the current route such that it matches requests where theHttpRequestMethod
is one of themethods
.- Parameters:
methods
- the methods to match.- Returns:
RouteContinuation
for the next steps of building a route.
-
andPathEquals
Extends the current route such that it matches requests where the path is equal topath
.- Parameters:
path
- the path to match.- Returns:
RouteContinuation
for the next steps of building a route.
-
andPathIsOneOf
Extends the current route such that it 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.
-
andPathStartsWith
Extends the current route such that it matches requests where the path starts withpathPrefix
.- Parameters:
pathPrefix
- the path prefix to match.- Returns:
RouteContinuation
for the next steps of building a route.
-
andPathMatches
Extends the current route such that it 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.
-
andPathMatches
Extends the current route such that it 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.
-
andQueryParam
Extends the current 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.
-
andHeader
Extends the current 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.
-
andCookie
Extends the current route with aCookieMatcher
that matches againstHttpSetCookie
s with the namename
.- 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.
-
andIsSsl
RouteContinuation andIsSsl()Extends the current route such that it matches requests that are over SSL/TLS.- Returns:
RouteContinuation
for the next steps of building a route.
-
andIsNotSsl
RouteContinuation andIsNotSsl()Extends the current route such that it matches requests that are not over SSL/TLS.- Returns:
RouteContinuation
for the next steps of building a route.
-
and
Extends the current route such that it matchesStreamingHttpRequest
s with a user-specifiedpredicate
.- Parameters:
predicate
- the predicate to evaluate against requests.- Returns:
RouteContinuation
for the next steps of building a route.
-
and
Extends the current route such that it 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.
-
executionStrategy
Specifies anHttpExecutionStrategy
to be used for this route.- Parameters:
routeStrategy
-HttpExecutionStrategy
to be used for this route.- Returns:
RouteContinuation
for the next steps of building a route.
-
thenRouteTo
Completes the route by specifying theStreamingHttpService
to route requests to that match the previously specified criteria. Each call tothenRouteTo
resets the criteria, prior to building the next route.- Parameters:
service
- theStreamingHttpService
to route requests to.- Returns:
RouteStarter
for building another route.
-
thenRouteTo
Completes the route by specifying theHttpService
to route requests to that match the previously specified criteria. Each call tothenRouteTo
resets the criteria, prior to building the next route.- Parameters:
service
- theHttpService
to route requests to.- Returns:
RouteStarter
for building another route.
-
thenRouteTo
Completes the route by specifying theBlockingHttpService
to route requests to that match the previously specified criteria. Each call tothenRouteTo
resets the criteria, prior to building the next route.- Parameters:
service
- theBlockingHttpService
to route requests to.- Returns:
RouteStarter
for building another route.
-
thenRouteTo
Completes the route by specifying theBlockingStreamingHttpService
to route requests to that match the previously specified criteria. Each call tothenRouteTo
resets the criteria, prior to building the next route.- Parameters:
service
- theBlockingStreamingHttpService
to route requests to.- Returns:
RouteStarter
for building another route.
-