org.glassfish.grizzly.filterchain
Class AbstractFilterChain
java.lang.Object
org.glassfish.grizzly.filterchain.AbstractFilterChain
- All Implemented Interfaces:
- Iterable<Filter>, Collection<Filter>, List<Filter>, FilterChain, Processor<Context>
- Direct Known Subclasses:
- ListFacadeFilterChain
public abstract class AbstractFilterChain
- extends Object
- implements FilterChain
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:
FilterChain
| Methods 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, retainAll, set, size, subList, toArray, toArray |
interestedIoEventsMask
protected final EnumSet<IOEvent> interestedIoEventsMask
AbstractFilterChain
public AbstractFilterChain()
indexOfType
public int indexOfType(Class<? extends Filter> filterType)
- Get the index of
Filter in chain, which type is filterType, or
-1 if the Filter of required type was not found.
- Specified by:
indexOfType in interface FilterChain
- Parameters:
filterType - the type of Filter to search.
- Returns:
- the index of
Filter in chain, which type is filterType, or
-1 if the Filter of required type was not found.
isInterested
public boolean isInterested(IOEvent ioEvent)
- Is this
Processor interested in processing the i/o event
- Specified by:
isInterested in interface Processor<Context>
- Returns:
- true, if this
Processor is interested and execution
process will start, false otherwise.
setInterested
public void setInterested(IOEvent ioEvent,
boolean isInterested)
- Set the the i/o event, this
Processor is interested in
- Specified by:
setInterested in interface Processor<Context>
- Parameters:
ioEvent - IOEventisInterested - true, if Processor is interested in
processing of the I/O event, or false otherwise.
obtainFilterChainContext
public final FilterChainContext obtainFilterChainContext(Connection connection)
- Specified by:
obtainFilterChainContext in interface FilterChain
obtainContext
public final Context obtainContext(Connection connection)
- Creates
Context
- Specified by:
obtainContext in interface Processor<Context>
- Parameters:
connection - Connection to obtain processor for.
- Returns:
Context, or null, if default Context
could be used.
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
Copyright © 2012 Oracle Corporation. All Rights Reserved.