org.glassfish.jersey.process.internal
Interface TreeAcceptor

All Superinterfaces:
com.google.common.base.Function<javax.ws.rs.core.Request,Pair<javax.ws.rs.core.Request,Iterator<TreeAcceptor>>>, Stage<javax.ws.rs.core.Request,Iterator<TreeAcceptor>>

public interface TreeAcceptor
extends Stage<javax.ws.rs.core.Request,Iterator<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.
 
Nested classes/interfaces inherited from interface org.glassfish.jersey.process.internal.Stage
Stage.Root
 
Method Summary
 Pair<javax.ws.rs.core.Request,Iterator<TreeAcceptor>> apply(javax.ws.rs.core.Request 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<javax.ws.rs.core.Request,Iterator<TreeAcceptor>> apply(javax.ws.rs.core.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.

Specified by:
apply in interface com.google.common.base.Function<javax.ws.rs.core.Request,Pair<javax.ws.rs.core.Request,Iterator<TreeAcceptor>>>
Specified by:
apply in interface Stage<javax.ws.rs.core.Request,Iterator<TreeAcceptor>>
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.