public interface Processor<E extends Context>
Modifier and Type | Method and Description |
---|---|
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,
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.
|
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 contextvoid read(Connection connection, CompletionHandler<ReadResult> completionHandler)
void write(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler)
void write(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler, MessageCloner messageCloner)
@Deprecated void write(Connection connection, Object dstAddress, Object message, CompletionHandler<WriteResult> completionHandler, PushBackHandler pushBackHandler)
boolean isInterested(IOEvent ioEvent)
Processor
interested in processing the i/o eventioEvent
- Processor
is interested and execution
process will start, false otherwise.Copyright © 2015 Oracle Corporation. All rights reserved.