org.glassfish.jersey.process.internal
Interface TreeAcceptor


public interface TreeAcceptor

Hierarchical request acceptor.

A continuation of a hierarchical acceptor is represented by an ordered collection of next level of hierarchical acceptors resulting in a hierarchical depth-first request transformation processing.

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

Nested Class Summary
static interface TreeAcceptor.Builder
          A TreeAcceptor builder.
 
Method Summary
 Pair<Request,java.util.Iterator<TreeAcceptor>> apply(Request data)
          Transforms supplied data and returns transformed data together with a processing continuation in the form of a <data, continuation> pair.
 

Method Detail

apply

Pair<Request,java.util.Iterator<TreeAcceptor>> apply(Request data)
Transforms supplied data and returns transformed data together with a processing continuation in the form of a <data, continuation> pair.

The returned continuation is an iterator over the next level of the tree acceptors that should be invoked. A non-empty iterator typically indicates that the processing is expected to continue further, while an empty iterator returned as a continuation indicates that the unidirectional hierarchical data transformation previously reached a leaf node and the depth-first processing algorithm needs to determine whether the processing is finished or whether it should back-up, move to a next branch and continue.

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.