org.glassfish.jersey.process.internal
Class FilteringAcceptor
java.lang.Object
org.glassfish.jersey.process.internal.AbstractChainableAcceptor
org.glassfish.jersey.process.internal.FilteringAcceptor
- All Implemented Interfaces:
- ChainableAcceptor, LinearAcceptor
public class FilteringAcceptor
- extends AbstractChainableAcceptor
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)
|
Method Summary |
Pair<Request,com.google.common.base.Optional<LinearAcceptor>> |
apply(Request request)
Transforms supplied data and returns transformed data together with
a processing continuation in the form of a <data, continuation>
pair. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilteringAcceptor
public FilteringAcceptor(RequestFilterProcessor requestFilterProcessor,
ResponseFilterProcessor responseFilterProcessor,
org.glassfish.hk2.Factory<org.glassfish.jersey.process.internal.JerseyFilterContext> filterContextFactory,
org.glassfish.hk2.Factory<ResponseProcessor.RespondingContext> 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.
apply
public Pair<Request,com.google.common.base.Optional<LinearAcceptor>> apply(Request request)
- Description copied from interface:
LinearAcceptor
- Transforms supplied data and returns transformed data together with
a processing continuation in the form of a <data, continuation>
pair.
The returned continuation is (optionally) the next linear
acceptor that should be invoked. A present
continuation indicates the processing is expected to continue further, while
absence of a continuation indicates that the
unidirectional request transformation passed its final stage.
- Parameters:
request - data to be transformed.
- Returns:
- a
pair of transformed data and processing continuation;
the transformed data is on the left and the processing continuation on
the right side of the pair.
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.