java.lang.Object
org.glassfish.grizzly.filterchain.AbstractFilterChain
org.glassfish.grizzly.filterchain.ListFacadeFilterChain
org.glassfish.grizzly.filterchain.DefaultFilterChain
- All Implemented Interfaces:
Iterable<Filter>
,Collection<Filter>
,List<Filter>
,FilterChain
,Processor<Context>
Default
FilterChain
implementation- Author:
- Alexey Stashok
- See Also:
-
Field Summary
Fields inherited from class org.glassfish.grizzly.filterchain.ListFacadeFilterChain
filters
Fields inherited from class org.glassfish.grizzly.filterchain.AbstractFilterChain
interestedIoEventsMask
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionExecute this FilterChain.protected org.glassfish.grizzly.filterchain.DefaultFilterChain.FilterExecution
executeChainPart
(FilterChainContext ctx, FilterExecutor executor, int start, int end, org.glassfish.grizzly.filterchain.DefaultFilterChain.FiltersState filtersState) protected NextAction
executeFilter
(FilterExecutor executor, Filter currentFilter, FilterChainContext ctx) void
fail
(FilterChainContext context, Throwable failure) void
fireEventDownstream
(Connection connection, FilterChainEvent event, CompletionHandler<FilterChainContext> completionHandler) void
fireEventUpstream
(Connection connection, FilterChainEvent event, CompletionHandler<FilterChainContext> completionHandler) void
flush
(Connection connection, CompletionHandler<WriteResult> completionHandler) Method will be called by framework to process some event, which occurred on a connectionvoid
read
(Connection connection, CompletionHandler<ReadResult> completionHandler) read
(FilterChainContext context) subList
(int fromIndex, int toIndex) void
write
(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler) void
write
(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler, MessageCloner messageCloner) void
write
(Connection connection, Object dstAddress, Object message, CompletionHandler completionHandler, PushBackHandler pushBackHandler) Deprecated.Methods inherited from class org.glassfish.grizzly.filterchain.ListFacadeFilterChain
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, notifyChangedExcept, remove, remove, removeAll, retainAll, set, size, toArray, toArray
Methods inherited from class org.glassfish.grizzly.filterchain.AbstractFilterChain
finalize, indexOfType, isInterested, obtainContext, obtainFilterChainContext, obtainFilterChainContext, obtainFilterChainContext, obtainFilterChainContext, setInterested, toString
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Constructor Details
-
DefaultFilterChain
public DefaultFilterChain() -
DefaultFilterChain
-
-
Method Details
-
process
Description copied from interface:Processor
Method will be called by framework to process some event, which occurred on a connection- Parameters:
context
- processing context- Returns:
- the result of I/O event processing
-
execute
Execute this FilterChain.- Parameters:
ctx
-FilterChainContext
processing context- Returns:
ProcessorResult
-
executeChainPart
protected org.glassfish.grizzly.filterchain.DefaultFilterChain.FilterExecution executeChainPart(FilterChainContext ctx, FilterExecutor executor, int start, int end, org.glassfish.grizzly.filterchain.DefaultFilterChain.FiltersState filtersState) throws IOException - Parameters:
ctx
-FilterChainContext
processing contextexecutor
-FilterExecutor
, which will call appropriate filter operation to processIOEvent
.- Returns:
- TODO: Update
- Throws:
IOException
-
executeFilter
protected NextAction executeFilter(FilterExecutor executor, Filter currentFilter, FilterChainContext ctx) throws IOException - Parameters:
executor
-currentFilter
-ctx
-- Returns:
NextAction
.- Throws:
IOException
-
read
-
read
- Throws:
IOException
-
write
public void write(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler) -
write
public void write(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler, MessageCloner messageCloner) -
write
@Deprecated public void write(Connection connection, Object dstAddress, Object message, CompletionHandler completionHandler, PushBackHandler pushBackHandler) Deprecated. -
flush
-
fireEventDownstream
public void fireEventDownstream(Connection connection, FilterChainEvent event, CompletionHandler<FilterChainContext> completionHandler) -
fireEventUpstream
public void fireEventUpstream(Connection connection, FilterChainEvent event, CompletionHandler<FilterChainContext> completionHandler) -
fail
-
subList
-