java.lang.Object
org.glassfish.grizzly.filterchain.AbstractFilterChain
- All Implemented Interfaces:
Iterable<Filter>,Collection<Filter>,List<Filter>,FilterChain,Processor<Context>
- Direct Known Subclasses:
ListFacadeFilterChain
Abstract
FilterChain implementation, which redirects
Processor.process(org.glassfish.grizzly.Context) call to the
FilterChain.execute(org.glassfish.grizzly.filterchain.FilterChainContext)- Author:
- Alexey Stashok
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfinalize()intindexOfType(Class<? extends Filter> filterType) booleanisInterested(IOEvent ioEvent) Is thisProcessorinterested in processing the i/o eventfinal ContextobtainContext(Connection connection) CreatesContextfinal FilterChainContextobtainFilterChainContext(Connection connection) obtainFilterChainContext(Connection connection, int startIdx, int endIdx, int currentIdx) obtainFilterChainContext(Connection connection, Closeable closeable) obtainFilterChainContext(Connection connection, Closeable closeable, int startIdx, int endIdx, int currentIdx) voidsetInterested(IOEvent ioEvent, boolean isInterested) Set the the i/o event, thisProcessoris interested intoString()Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface org.glassfish.grizzly.filterchain.FilterChain
execute, fail, fireEventDownstream, fireEventUpstream, flush, readMethods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Field Details
-
interestedIoEventsMask
-
-
Constructor Details
-
AbstractFilterChain
public AbstractFilterChain()
-
-
Method Details
-
indexOfType
Get the index ofFilterin chain, which type is filterType, or -1 if theFilterof required type was not found.- Specified by:
indexOfTypein interfaceFilterChain- Parameters:
filterType- the type ofFilterto search.- Returns:
- the index of
Filterin chain, which type is filterType, or -1 if theFilterof required type was not found.
-
isInterested
Is thisProcessorinterested in processing the i/o event- Specified by:
isInterestedin interfaceProcessor<Context>- Parameters:
ioEvent- the event to check if the Processor is interested in- Returns:
- true, if this
Processoris interested and execution process will start, false otherwise.
-
setInterested
Set the the i/o event, thisProcessoris interested in- Specified by:
setInterestedin interfaceProcessor<Context>- Parameters:
ioEvent-IOEventisInterested- true, ifProcessoris interested in processing of the I/O event, or false otherwise.
-
obtainFilterChainContext
- Specified by:
obtainFilterChainContextin interfaceFilterChain
-
obtainFilterChainContext
- Specified by:
obtainFilterChainContextin interfaceFilterChain
-
obtainFilterChainContext
public FilterChainContext obtainFilterChainContext(Connection connection, int startIdx, int endIdx, int currentIdx) - Specified by:
obtainFilterChainContextin interfaceFilterChain
-
obtainFilterChainContext
public FilterChainContext obtainFilterChainContext(Connection connection, Closeable closeable, int startIdx, int endIdx, int currentIdx) - Specified by:
obtainFilterChainContextin interfaceFilterChain
-
toString
-
obtainContext
CreatesContext- Specified by:
obtainContextin interfaceProcessor<Context>- Parameters:
connection-Connectionto obtain processor for.- Returns:
Context, or null, if defaultContextcould be used.
-
finalize
-