org.glassfish.jersey.process.internal
Class FilteringStage

java.lang.Object
  extended by org.glassfish.jersey.process.internal.AbstractChainableStage<Request>
      extended by org.glassfish.jersey.process.internal.FilteringStage
All Implemented Interfaces:
ChainableStage<Request>, Stage<Request>

public class FilteringStage
extends AbstractChainableStage<Request>

Filtering chainable acceptor that runs request filter processor on a request and registers response filter processor to be run on a response.

The acceptor may break the chain by directly returning a response in case any of the executed request filters sets a response in the filter context.

Author:
Pavel Bucek (pavel.bucek at oracle.com), Santiago Pericas-Geertsen (santiago.pericasgeertsen at oracle.com)

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.jersey.process.internal.Stage
Stage.Builder<DATA>, Stage.Continuation<DATA>
 
Constructor Summary
FilteringStage(RequestFilterProcessor requestFilterProcessor, ResponseFilterProcessor responseFilterProcessor, org.glassfish.hk2.Factory<org.glassfish.jersey.process.internal.JerseyFilterContext> filterContextFactory, org.glassfish.hk2.Factory<ResponseProcessor.RespondingContext<Response>> respondingContextFactory)
          Create a new filtering acceptor.
 
Method Summary
 Stage.Continuation<Request> apply(Request request)
          Performs a data processing task and returns the processed data together with a processing continuation.
 
Methods inherited from class org.glassfish.jersey.process.internal.AbstractChainableStage
getDefaultNext, setDefaultNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteringStage

public FilteringStage(RequestFilterProcessor requestFilterProcessor,
                      ResponseFilterProcessor responseFilterProcessor,
                      org.glassfish.hk2.Factory<org.glassfish.jersey.process.internal.JerseyFilterContext> filterContextFactory,
                      org.glassfish.hk2.Factory<ResponseProcessor.RespondingContext<Response>> respondingContextFactory)
Create a new filtering acceptor.

Parameters:
requestFilterProcessor - request filter processor to be executed on requests.
responseFilterProcessor - response filter processor to be executed on responses.
filterContextFactory - factory providing request-scoped filter contexts.
respondingContextFactory - factory providing request-scoped responding contexts.
Method Detail

apply

public Stage.Continuation<Request> apply(Request request)
Description copied from interface: Stage
Performs a data processing task and returns the processed data together with a processing continuation.

Parameters:
request - data to be transformed.
Returns:
a processing continuation.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.