org.glassfish.jersey.process.internal
Class AbstractFilterProcessor<T>

java.lang.Object
  extended by org.glassfish.jersey.process.internal.AbstractFilterProcessor<T>
Type Parameters:
T - Parameter representing the filter type
Direct Known Subclasses:
RequestFilterProcessor, ResponseFilterProcessor

public abstract class AbstractFilterProcessor<T>
extends java.lang.Object

Abstract filter processor.

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

Field Summary
protected  org.glassfish.hk2.Factory<org.glassfish.jersey.process.internal.JerseyFilterContext> filterContextFactory
           
 
Constructor Summary
protected AbstractFilterProcessor()
          Initialize filter ordering to a default value, i.e.
protected AbstractFilterProcessor(PriorityComparator.Order order)
          Initialize filter ordering to a custom value.
 
Method Summary
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
 

Field Detail

filterContextFactory

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

AbstractFilterProcessor

protected AbstractFilterProcessor()
Initialize filter ordering to a default value, i.e. PriorityComparator.Order.ASCENDING


AbstractFilterProcessor

protected AbstractFilterProcessor(PriorityComparator.Order order)
Initialize filter ordering to a custom value. The value can be either PriorityComparator.Order.ASCENDING or PriorityComparator.Order.DESCENDING.

Parameters:
order - Order defining how filters should be sorted.
Method Detail

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.