org.glassfish.jersey.process.internal
Interface Stage<DATA,CONTINUATION>

Type Parameters:
DATA - transformable data type. Typically a request, a response or a related context structure.
CONTINUATION - continuation type. Depends on the stage type.
All Superinterfaces:
com.google.common.base.Function<DATA,Pair<DATA,CONTINUATION>>
All Known Subinterfaces:
LinearAcceptor, RequestProcessor, Responder, TreeAcceptor
All Known Implementing Classes:
HierarchicalRequestProcessor, LinearRequestProcessor, PreMatchRequestFilterAcceptor, RequestFilterAcceptor

public interface Stage<DATA,CONTINUATION>
extends com.google.common.base.Function<DATA,Pair<DATA,CONTINUATION>>

A generic unidirectional transformation function designed to be used in a Continuation-passing style for request or response processing.

Author:
Marek Potociar (marek.potociar at oracle.com)

Nested Class Summary
static interface Stage.Root
          Root stage qualifier
 
Method Summary
 Pair<DATA,CONTINUATION> apply(DATA data)
          Transforms supplied data and returns transformed data together with a processing continuation in the form of a <data, continuation> pair.
 
Methods inherited from interface com.google.common.base.Function
equals
 

Method Detail

apply

Pair<DATA,CONTINUATION> apply(DATA data)
Transforms supplied data and returns transformed data together with a processing continuation in the form of a <data, continuation> pair.

Specified by:
apply in interface com.google.common.base.Function<DATA,Pair<DATA,CONTINUATION>>
Parameters:
data - 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.