- All Known Subinterfaces:
FilterChain
- All Known Implementing Classes:
AbstractFilterChain,DefaultFilterChain,ListFacadeFilterChain,StandaloneProcessor
public interface Processor<E extends Context>
Processor implementations are responsible for processing I/O events, which occur on connection.
- Author:
- Alexey Stashok
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisInterested(IOEvent ioEvent) Is thisProcessorinterested in processing the i/o eventobtainContext(Connection connection) CreatesContextMethod will be called by framework to process some event, which occurred on a connectionvoidread(Connection connection, CompletionHandler<ReadResult> completionHandler) voidsetInterested(IOEvent ioEvent, boolean isInterested) Set the the i/o event, thisProcessoris interested invoidwrite(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler) voidwrite(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler, MessageCloner messageCloner) voidwrite(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler, PushBackHandler pushBackHandler) Deprecated.
-
Method Details
-
obtainContext
CreatesContext- Parameters:
connection-Connectionto obtain processor for.- Returns:
Context, or null, if defaultContextcould be used.
-
process
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
-
read
-
write
void write(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler) -
write
void write(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler, MessageCloner messageCloner) -
write
@Deprecated void write(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler, PushBackHandler pushBackHandler) Deprecated. -
isInterested
Is thisProcessorinterested in processing the i/o event- 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
-