|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Processor<E extends Context>
Processor implementations are responsible for processing I/O events, which occur on connection.
| Method Summary | |
|---|---|
boolean |
isInterested(IOEvent ioEvent)
Is this Processor interested in processing the i/o event |
E |
obtainContext(Connection connection)
Creates Context |
ProcessorResult |
process(E context)
Method will be called by framework to process some event, which occurred on a connection |
void |
read(Connection connection,
CompletionHandler<ReadResult> completionHandler)
|
void |
setInterested(IOEvent ioEvent,
boolean isInterested)
Set the the i/o event, this Processor is interested in |
void |
write(Connection connection,
java.lang.Object dstAddress,
java.lang.Object message,
CompletionHandler<WriteResult> completionHandler,
PushBackHandler pushBackHandler)
|
| Method Detail |
|---|
E obtainContext(Connection connection)
Context
connection - Connection to obtain processor for.
Context, or null, if default Context
could be used.ProcessorResult process(E context)
context - processing context
void read(Connection connection,
CompletionHandler<ReadResult> completionHandler)
void write(Connection connection,
java.lang.Object dstAddress,
java.lang.Object message,
CompletionHandler<WriteResult> completionHandler,
PushBackHandler pushBackHandler)
boolean isInterested(IOEvent ioEvent)
Processor interested in processing the i/o event
ioEvent -
Processor is interested and execution
process will start, false otherwise.
void setInterested(IOEvent ioEvent,
boolean isInterested)
Processor is interested in
ioEvent - IOEventisInterested - true, if Processor is interested in
processing of the I/O event, or false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||