Package org.glassfish.jersey.server
Class ContainerFilteringStage
- java.lang.Object
-
- org.glassfish.jersey.process.internal.AbstractChainableStage<RequestProcessingContext>
-
- org.glassfish.jersey.server.ContainerFilteringStage
-
- All Implemented Interfaces:
ChainableStage<RequestProcessingContext>
,Stage<RequestProcessingContext>
class ContainerFilteringStage extends AbstractChainableStage<RequestProcessingContext>
Container filtering stage responsible for execution of request and response filters on each request-response message exchange.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ContainerFilteringStage.ResponseFilterStage
-
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 java.lang.Iterable<RankedProvider<javax.ws.rs.container.ContainerRequestFilter>>
requestFilters
private java.lang.Iterable<RankedProvider<javax.ws.rs.container.ContainerResponseFilter>>
responseFilters
-
Constructor Summary
Constructors Constructor Description ContainerFilteringStage(java.lang.Iterable<RankedProvider<javax.ws.rs.container.ContainerRequestFilter>> requestFilters, java.lang.Iterable<RankedProvider<javax.ws.rs.container.ContainerResponseFilter>> responseFilters)
Create a new container filtering stage specifying global request and response filters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
requestFilters
private final java.lang.Iterable<RankedProvider<javax.ws.rs.container.ContainerRequestFilter>> requestFilters
-
responseFilters
private final java.lang.Iterable<RankedProvider<javax.ws.rs.container.ContainerResponseFilter>> responseFilters
-
-
Constructor Detail
-
ContainerFilteringStage
ContainerFilteringStage(java.lang.Iterable<RankedProvider<javax.ws.rs.container.ContainerRequestFilter>> requestFilters, java.lang.Iterable<RankedProvider<javax.ws.rs.container.ContainerResponseFilter>> responseFilters)
Create a new container filtering stage specifying global request and response filters. This stage class is reused for both pre and post match filtering phases.All global response filters are passed in the pre-match stage, since if a pre-match filter aborts, response filters should still be executed. For the post-match filter stage creation,
null
is passed to the responseFilters parameter.- Parameters:
requestFilters
- list of global (unbound) request filters (either pre or post match - depending on the stage being created).responseFilters
- list of global response filters (for pre-match stage) ornull
(for post-match stage).
-
-
Method Detail
-
apply
public Stage.Continuation<RequestProcessingContext> apply(RequestProcessingContext context)
Description copied from interface:Stage
Performs a data processing task and returns the processed data together with aprocessing continuation
.- Parameters:
context
- data to be transformed.- Returns:
- a processing continuation.
-
-