org.glassfish.jersey.process.internal
Class LinearRequestProcessor

java.lang.Object
  extended by org.glassfish.jersey.process.internal.LinearRequestProcessor
All Implemented Interfaces:
RequestProcessor

public class LinearRequestProcessor
extends java.lang.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 Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.jersey.process.internal.RequestProcessor
RequestProcessor.AcceptingContext
 
Constructor Summary
LinearRequestProcessor(LinearAcceptor rootAcceptor)
          Construct a linear acceptor request processor.
 
Method Summary
 Pair<Request,com.google.common.base.Optional<Inflector<Request,Response>>> apply(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
 

Constructor Detail

LinearRequestProcessor

public LinearRequestProcessor(LinearAcceptor rootAcceptor)
Construct a linear acceptor request processor.

Parameters:
rootAcceptor - head of the nested linear stage chain to be run.
Method Detail

apply

public Pair<Request,com.google.common.base.Optional<Inflector<Request,Response>>> apply(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 RequestProcessor
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.