org.glassfish.jersey.server.internal.routing
Class Router.Continuation

java.lang.Object
  extended by org.glassfish.jersey.server.internal.routing.Router.Continuation
Enclosing interface:
Router

public static final class Router.Continuation
extends Object

Hierarchical request routing continuation.

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.


Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

of

public static Router.Continuation of(ContainerRequest result)
Create a terminal continuation from the routed request.

Parameters:
result - routed request.
Returns:
terminal continuation with no next level routers in the routing hierarchy and the supplied routed request.

of

public static Router.Continuation of(ContainerRequest result,
                                     Iterable<Router> next)
Create a continuation from the routed request and a collection of next level routers.

Parameters:
result - routed request.
next - next level routers.
Returns:
a continuation with the supplied next level routers to be invoked next in the routing chain and the supplied routed request.

of

public static Router.Continuation of(ContainerRequest request,
                                     Router next)
Create a continuation from the routed request and a single of next level routers.

Parameters:
request - routed request.
next - next level router.
Returns:
a continuation with the supplied next level router to be invoked next in the routing chain and the supplied routed request.

requestContext

public ContainerRequest requestContext()
Get the routed request context.

Returns:
routed request context.

next

public Iterable<Router> next()
Get the next level routers to be invoked or an empty if no next level routers are present.

Returns:
the next level routers to be invoked or an empty collection if not present.

hasNext

public boolean hasNext()
Check if there are any next level routers present in the continuation.

The absence of any next level routers in the continuation indicates that the request routing reached a leaf stage.

Returns:
true if there are any next level routers present in the continuation, false otherwise.


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.