public static final class Router.Continuation
extends java.lang.Object
A continuation of a hierarchical request routing is represented by an ordered collection of next level of routers resulting in a hierarchical depth-first (depth-only) request routing.
Modifier and Type | Field and Description |
---|---|
private java.lang.Iterable<Router> |
next |
private RequestProcessingContext |
requestProcessingContext |
Modifier | Constructor and Description |
---|---|
private |
Continuation(RequestProcessingContext request,
java.lang.Iterable<Router> next) |
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.Iterable<Router> |
next()
Get the next level routers to be invoked or
an empty if no next
level routers are present. |
(package private) static Router.Continuation |
of(RequestProcessingContext result)
Create a terminal continuation from the routed request.
|
(package private) static Router.Continuation |
of(RequestProcessingContext result,
java.lang.Iterable<Router> next)
Create a continuation from the routed request and a collection
of next level routers.
|
(package private) static Router.Continuation |
of(RequestProcessingContext request,
Router next)
Create a continuation from the routed request and a single
of next level routers.
|
(package private) RequestProcessingContext |
requestContext()
Get the routed request context.
|
private final RequestProcessingContext requestProcessingContext
private final java.lang.Iterable<Router> next
private Continuation(RequestProcessingContext request, java.lang.Iterable<Router> next)
static Router.Continuation of(RequestProcessingContext result)
result
- routed request.next level routers
in the routing hierarchy and the supplied routed request.static Router.Continuation of(RequestProcessingContext result, java.lang.Iterable<Router> next)
result
- routed request.next
- next level routers.next
in the routing chain and the supplied routed
request.static Router.Continuation of(RequestProcessingContext request, Router next)
request
- routed request.next
- next level router.next
in the routing chain and the supplied routed
request.RequestProcessingContext requestContext()
java.lang.Iterable<Router> next()
an empty
if no next
level routers are present.