Class RoutingStage
- java.lang.Object
-
- org.glassfish.jersey.process.internal.AbstractChainableStage<RequestProcessingContext>
-
- org.glassfish.jersey.server.internal.routing.RoutingStage
-
- All Implemented Interfaces:
ChainableStage<RequestProcessingContext>
,Stage<RequestProcessingContext>
final class RoutingStage extends AbstractChainableStage<RequestProcessingContext>
Request pre-processing stage that encapsulates hierarchical resource matching and request routing. Once the routing is finished, an endpoint (if matched) isstored in the routing context
.- See Also:
MatchedEndpointExtractorStage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RoutingStage.RoutingResult
-
Nested classes/interfaces inherited from interface org.glassfish.jersey.process.internal.Stage
Stage.Builder<DATA>, Stage.Continuation<DATA>
-
-
Field Summary
Fields Modifier and Type Field Description private Router
routingRoot
-
Constructor Summary
Constructors Constructor Description RoutingStage(Router routingRoot)
Create a new routing stage instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private RoutingStage.RoutingResult
_apply(RequestProcessingContext request, Router router)
Stage.Continuation<RequestProcessingContext>
apply(RequestProcessingContext context)
Performs a data processing task and returns the processed data together with aprocessing continuation
.-
Methods inherited from class org.glassfish.jersey.process.internal.AbstractChainableStage
getDefaultNext, setDefaultNext
-
-
-
-
Field Detail
-
routingRoot
private final Router routingRoot
-
-
Constructor Detail
-
RoutingStage
RoutingStage(Router routingRoot)
Create a new routing stage instance.- Parameters:
routingRoot
- root router.
-
-
Method Detail
-
apply
public Stage.Continuation<RequestProcessingContext> apply(RequestProcessingContext context)
Performs a data processing task and returns the processed data together with aprocessing continuation
. Routing stage navigates through the nestedrouting hierarchy
using a depth-first transformation strategy until a request-to-response inflector isfound on a leaf stage node
, in which case the request routing is terminated and aninflector
(if found) is pushed to therouting context
.- Parameters:
context
- data to be transformed.- Returns:
- a processing continuation.
-
_apply
private RoutingStage.RoutingResult _apply(RequestProcessingContext request, Router router)
-
-