public static final class Router.Continuation extends 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 | Method and Description |
|---|---|
boolean |
hasNext()
Check if there are any next level routers present in the continuation.
|
Iterable<Router> |
next()
Get the next level routers to be invoked or
an empty if no next
level routers are present. |
static Router.Continuation |
of(ContainerRequest result)
Create a terminal continuation from the routed request.
|
static Router.Continuation |
of(ContainerRequest result,
Iterable<Router> next)
Create a continuation from the routed request and a collection
of next level routers.
|
static Router.Continuation |
of(ContainerRequest request,
Router next)
Create a continuation from the routed request and a single
of next level routers.
|
ContainerRequest |
requestContext()
Get the routed request context.
|
public static Router.Continuation of(ContainerRequest result)
result - routed request.next level routers
in the routing hierarchy and the supplied routed request.public static Router.Continuation of(ContainerRequest result, Iterable<Router> next)
result - routed request.next - next level routers.next in the routing chain and the supplied routed
request.public static Router.Continuation of(ContainerRequest request, Router next)
request - routed request.next - next level router.next in the routing chain and the supplied routed
request.public ContainerRequest requestContext()
public Iterable<Router> next()
an empty if no next
level routers are present.public boolean hasNext()
The absence of any next level routers in the continuation indicates that the request routing reached a leaf stage.
true if there are any next level routers present in the continuation,
false otherwise.Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.