public final class DefaultFilterChain extends ListFacadeFilterChain
FilterChain
implementationFilterChain
,
Filter
Modifier and Type | Class and Description |
---|---|
static class |
DefaultFilterChain.FILTER_STATE_TYPE |
static class |
DefaultFilterChain.FiltersState |
static class |
DefaultFilterChain.FilterStateElement |
filters
interestedIoEventsMask
Constructor and Description |
---|
DefaultFilterChain() |
DefaultFilterChain(Collection<Filter> initialFilters) |
Modifier and Type | Method and Description |
---|---|
ProcessorResult |
execute(FilterChainContext ctx)
Execute this FilterChain.
|
protected org.glassfish.grizzly.filterchain.DefaultFilterChain.FilterExecution |
executeChainPart(FilterChainContext ctx,
FilterExecutor executor,
int start,
int end,
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) |
protected static int |
indexOfRemainder(DefaultFilterChain.FiltersState filtersState,
FilterChainContext.Operation operation,
int start,
int end)
Locates a message remainder in the
FilterChain , associated with the
Connection . |
protected static boolean |
prepareRemainder(FilterChainContext ctx,
DefaultFilterChain.FiltersState filtersState,
int start,
int end)
Locates a message remainder in the
FilterChain , associated with the
Connection and prepares the Context for remainder processing. |
ProcessorResult |
process(Context context)
Method will be called by framework to process some event, which
occurred on a connection
|
void |
read(Connection connection,
CompletionHandler<ReadResult> completionHandler) |
ReadResult |
read(FilterChainContext context) |
DefaultFilterChain |
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.
|
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, notifyChangedExcept, remove, remove, removeAll, retainAll, set, size, toArray, toArray
finalize, indexOfType, isInterested, obtainContext, obtainFilterChainContext, obtainFilterChainContext, setInterested
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public DefaultFilterChain()
public DefaultFilterChain(Collection<Filter> initialFilters)
public ProcessorResult process(Context context)
Processor
context
- processing contextpublic ProcessorResult execute(FilterChainContext ctx)
ctx
- FilterChainContext
processing contextProcessorResult
Exception
protected final org.glassfish.grizzly.filterchain.DefaultFilterChain.FilterExecution executeChainPart(FilterChainContext ctx, FilterExecutor executor, int start, int end, DefaultFilterChain.FiltersState filtersState) throws IOException
ctx
- FilterChainContext
processing contextexecutor
- FilterExecutor
, which will call appropriate
filter operation to process IOEvent
.IOException
protected NextAction executeFilter(FilterExecutor executor, Filter currentFilter, FilterChainContext ctx) throws IOException
executor
- currentFilter
- ctx
- NextAction
.IOException
protected static boolean prepareRemainder(FilterChainContext ctx, DefaultFilterChain.FiltersState filtersState, int start, int end)
FilterChain
, associated with the
Connection
and prepares the Context
for remainder processing.protected static int indexOfRemainder(DefaultFilterChain.FiltersState filtersState, FilterChainContext.Operation operation, int start, int end)
FilterChain
, associated with the
Connection
.public void read(Connection connection, CompletionHandler<ReadResult> completionHandler)
public ReadResult read(FilterChainContext context) throws IOException
IOException
public void write(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler)
public void write(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler, MessageCloner messageCloner)
@Deprecated public void write(Connection connection, Object dstAddress, Object message, CompletionHandler completionHandler, PushBackHandler pushBackHandler)
public void flush(Connection connection, CompletionHandler<WriteResult> completionHandler)
public void fireEventDownstream(Connection connection, FilterChainEvent event, CompletionHandler<FilterChainContext> completionHandler)
public void fireEventUpstream(Connection connection, FilterChainEvent event, CompletionHandler<FilterChainContext> completionHandler)
public void fail(FilterChainContext context, Throwable failure)
public DefaultFilterChain subList(int fromIndex, int toIndex)
Copyright © 2014 Oracle Corporation. All rights reserved.