|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AsyncReadCallbackHandler
Callback handler interface, used by AsyncQueueReader to notify
custom code either about completion of specific ByteBuffer reading
or about IO problem, which occured when reading data to a ByteBuffer
| Method Summary | |
|---|---|
void |
onException(Exception exception,
SelectionKey key,
ByteBuffer buffer,
Queue<AsyncQueueReadUnit> remainingQueue)
Method will be called by AsyncQueueReader, if
error occured when reading from the SelectableChannel,
which is associated with SelectionKey |
void |
onReadCompleted(SelectionKey key,
SocketAddress srcAddress,
AsyncQueueReadUnit readRecord)
Method will be called by AsyncQueueReader, if
data was read to the ByteBuffer from the
SelectableChannel, associated with SelectionKey,
and read data confirms to the user-specific condition (if any was set). |
| Method Detail |
|---|
void onReadCompleted(SelectionKey key,
SocketAddress srcAddress,
AsyncQueueReadUnit readRecord)
AsyncQueueReader, if
data was read to the ByteBuffer from the
SelectableChannel, associated with SelectionKey,
and read data confirms to the user-specific condition (if any was set).
key - SelectionKey, associated with input
SelectableChannelsrcAddress - sender's SocketAddressreadRecord - AsyncWriteQueueRecord, which was successfuly
read
void onException(Exception exception,
SelectionKey key,
ByteBuffer buffer,
Queue<AsyncQueueReadUnit> remainingQueue)
AsyncQueueReader, if
error occured when reading from the SelectableChannel,
which is associated with SelectionKey
exception - occurred Exceptionkey - SelectionKey, associated with input
SelectableChannelbuffer - ByteBuffer, which supposed to be used for
asynchronous reading. ByteBuffer could contain
some data, which was successfully read before error occured
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||