org.glassfish.jersey.process.internal
Class RequestFilterAcceptor

java.lang.Object
  extended by org.glassfish.jersey.process.internal.RequestFilterAcceptor
All Implemented Interfaces:
com.google.common.base.Function<Request,Pair<Request,com.google.common.base.Optional<LinearAcceptor>>>, LinearAcceptor, Stage<Request,com.google.common.base.Optional<LinearAcceptor>>

public class RequestFilterAcceptor
extends java.lang.Object
implements LinearAcceptor

Author:
Pavel Bucek (pavel.bucek at oracle.com), Santiago Pericas-Geertsen (santiago.pericasgeertsen at oracle.com)

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.jersey.process.internal.LinearAcceptor
LinearAcceptor.Builder
 
Nested classes/interfaces inherited from interface org.glassfish.jersey.process.internal.Stage
Stage.Root
 
Field Summary
protected  org.glassfish.hk2.Factory<org.glassfish.jersey.process.internal.JerseyFilterContext> filterContextFactory
           
 
Constructor Summary
RequestFilterAcceptor()
           
 
Method Summary
 Pair<Request,com.google.common.base.Optional<LinearAcceptor>> apply(Request data)
          Transforms supplied data and returns transformed data together with a processing continuation in the form of a <data, continuation> pair.
protected  java.util.List<T> getFilters(java.lang.Class<T> filterContract)
          Get the filter providers for the specific filter contract, sorted by their binding priority.
protected  java.util.Map<java.lang.String,java.lang.Object> getProperties()
          Get the immutable bag of request-scoped configuration properties.
 
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
 

Field Detail

filterContextFactory

protected org.glassfish.hk2.Factory<org.glassfish.jersey.process.internal.JerseyFilterContext> filterContextFactory
Constructor Detail

RequestFilterAcceptor

public RequestFilterAcceptor()
Method Detail

apply

public Pair<Request,com.google.common.base.Optional<LinearAcceptor>> apply(Request data)
Description copied from interface: LinearAcceptor
Transforms supplied data and returns transformed data together with a processing continuation in the form of a <data, continuation> pair.

The returned continuation is (optionally) the next linear acceptor that should be invoked. A present continuation indicates the processing is expected to continue further, while absence of a continuation indicates that the unidirectional request transformation passed its final stage.

Specified by:
apply in interface com.google.common.base.Function<Request,Pair<Request,com.google.common.base.Optional<LinearAcceptor>>>
Specified by:
apply in interface LinearAcceptor
Specified by:
apply in interface Stage<Request,com.google.common.base.Optional<LinearAcceptor>>
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.

getFilters

protected final java.util.List<T> getFilters(java.lang.Class<T> filterContract)
Get the filter providers for the specific filter contract, sorted by their binding priority. The filter ordering is determined by the order defined in this instance.

Parameters:
filterContract - filter contract.
Returns:
sorted list of filter contract providers.

getProperties

protected final java.util.Map<java.lang.String,java.lang.Object> getProperties()
Get the immutable bag of request-scoped configuration properties.

Returns:
immutable property map.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.