com.sun.grizzly.filterchain
Class DefaultFilterChain
java.lang.Object
com.sun.grizzly.filterchain.AbstractFilterChain
com.sun.grizzly.filterchain.ListFacadeFilterChain
com.sun.grizzly.filterchain.DefaultFilterChain
- All Implemented Interfaces:
- FilterChain, Processor, Iterable<Filter>, Collection<Filter>, List<Filter>
public class DefaultFilterChain
- extends ListFacadeFilterChain
Default FilterChain implementation
- Author:
- Alexey Stashok
- See Also:
FilterChain,
Filter
| Methods inherited from class com.sun.grizzly.filterchain.ListFacadeFilterChain |
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultFilterChain
public DefaultFilterChain(FilterChainFactory factory)
execute
public ProcessorResult execute(FilterChainContext ctx)
- Execute this FilterChain.
- Specified by:
execute in class AbstractFilterChain
- Parameters:
ctx - FilterChainContext processing context
- Returns:
ProcessorResult
- Throws:
Exception
executeChain
protected boolean executeChain(FilterChainContext ctx,
DefaultFilterChain.FilterExecutor executor)
throws Exception
- Sequentially lets each
Filter in chain to process IOEvent.
- Parameters:
ctx - FilterChainContext processing contextexecutor - DefaultFilterChain.FilterExecutor, which will call appropriate
filter operation to process IOEvent.
- Returns:
- false to terminate exectution, or true for
normal exection process
- Throws:
Exception
postExecuteChain
protected boolean postExecuteChain(FilterChainContext ctx,
DefaultFilterChain.FilterExecutor executor)
throws Exception
- Sequentially lets each executed
Filter to post process
IOEvent. The Filters will be called in opposite order
they were called on processing phase.
- Parameters:
ctx - FilterChainContext processing contextexecutor - DefaultFilterChain.FilterExecutor, which will call appropriate
filter operation to post process IOEvent.
- Returns:
- false to terminate exectution, or true for
normal exection process
- Throws:
Exception
throwChain
protected void throwChain(FilterChainContext ctx,
Throwable exception)
- Notify the filters about error.
- Parameters:
ctx - FilterChainContext
getCodec
public Codec getCodec()
- Get filter chain codec
- Returns:
- filter chain codec
Copyright © 2009 SUN Microsystems. All Rights Reserved.