|
||||||||||
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 |
onIOException(IOException ioException,
SelectionKey key,
ByteBuffer buffer,
Queue<AsyncReadQueueRecord> remainingQueue)
Method will be called by AsyncQueueReader , if
IO error occured when reading from the SelectableChannel ,
which is associated with SelectionKey |
void |
onReadCompleted(SelectionKey key,
SocketAddress srcAddress,
ByteBuffer buffer)
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, ByteBuffer buffer)
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
SelectableChannel
srcAddress
- sender's SocketAddress
buffer
- ByteBuffer
with read datavoid onIOException(IOException ioException, SelectionKey key, ByteBuffer buffer, Queue<AsyncReadQueueRecord> remainingQueue)
AsyncQueueReader
, if
IO error occured when reading from the SelectableChannel
,
which is associated with SelectionKey
ioException
- occured IOException
key
- SelectionKey
, associated with input
SelectableChannel
buffer
- 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 |