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