org.glassfish.jersey.process.internal
Class LinearRequestProcessor
java.lang.Object
org.glassfish.jersey.process.internal.LinearRequestProcessor
- All Implemented Interfaces:
- com.google.common.base.Function<javax.ws.rs.core.Request,Pair<javax.ws.rs.core.Request,com.google.common.base.Optional<Inflector<javax.ws.rs.core.Request,javax.ws.rs.core.Response>>>>, RequestProcessor, Stage<javax.ws.rs.core.Request,com.google.common.base.Optional<Inflector<javax.ws.rs.core.Request,javax.ws.rs.core.Response>>>
public class LinearRequestProcessor
- extends Object
- implements RequestProcessor
A composite linear acceptor request processor.
When invoked, the supplied data are first
transformed by the nested linear stage chain. Once a terminal stage is reached
a continuation is returned with the transformed request on the left side
and the inflector (optionally) provided by the terminal stage
on the right side.
- Author:
- Marek Potociar (marek.potociar at oracle.com)
| Nested classes/interfaces inherited from interface org.glassfish.jersey.process.internal.Stage |
Stage.Root |
|
Method Summary |
Pair<javax.ws.rs.core.Request,com.google.common.base.Optional<Inflector<javax.ws.rs.core.Request,javax.ws.rs.core.Response>>> |
apply(javax.ws.rs.core.Request request)
Traverse through the nested request stages and apply request transformations
until a terminal stage providing a request-to-response inflector
is reached. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.google.common.base.Function |
equals |
LinearRequestProcessor
public LinearRequestProcessor(@Stage.Root
LinearAcceptor rootAcceptor,
org.glassfish.hk2.Factory<StagingContext<javax.ws.rs.core.Request>> contextProvider)
- Construct a
linear acceptor request processor.
- Parameters:
rootAcceptor - head of the nested linear stage chain to be run.contextProvider - provider of the staging context to be invoked
before and after each stage is applied.
apply
public Pair<javax.ws.rs.core.Request,com.google.common.base.Optional<Inflector<javax.ws.rs.core.Request,javax.ws.rs.core.Response>>> apply(javax.ws.rs.core.Request request)
- Traverse through the nested request stages and apply request transformations
until a terminal stage
providing a request-to-response inflector
is reached. If the terminal stage does not provide an inflector, the inflector
returned on the right side of the continuation will
be absent.
This implementation transforms the request using a nested linear stage chain.
Once a terminal stage is reached a continuation is returned with the transformed
request on the left side and the inflector (optionally)
provided by the terminal stage on the right side.
- Specified by:
apply in interface com.google.common.base.Function<javax.ws.rs.core.Request,Pair<javax.ws.rs.core.Request,com.google.common.base.Optional<Inflector<javax.ws.rs.core.Request,javax.ws.rs.core.Response>>>>- Specified by:
apply in interface RequestProcessor- Specified by:
apply in interface Stage<javax.ws.rs.core.Request,com.google.common.base.Optional<Inflector<javax.ws.rs.core.Request,javax.ws.rs.core.Response>>>
- Parameters:
request - request data to be transformed
- Returns:
- continuation with the transformed request on the
left side and the (optional) request-to-response inflector on the
right side.
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.