- 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 TypeMethodDescriptionboolean
isInterested
(IOEvent ioEvent) Is thisProcessor
interested in processing the i/o eventobtainContext
(Connection connection) CreatesContext
Method will be called by framework to process some event, which occurred on a connectionvoid
read
(Connection connection, CompletionHandler<ReadResult> completionHandler) void
setInterested
(IOEvent ioEvent, boolean isInterested) Set the the i/o event, thisProcessor
is interested invoid
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<WriteResult> completionHandler, PushBackHandler pushBackHandler) Deprecated.
-
Method Details
-
obtainContext
CreatesContext
- Parameters:
connection
-Connection
to obtain processor for.- Returns:
Context
, or null, if defaultContext
could 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 thisProcessor
interested in processing the i/o event- Parameters:
ioEvent
- the event to check if the Processor is interested in- Returns:
- true, if this
Processor
is interested and execution process will start, false otherwise.
-
setInterested
Set the the i/o event, thisProcessor
is interested in
-