com.sun.grizzly.async
Interface AsyncReadCondition
public interface AsyncReadCondition
Interface represents condition, which will be checked when
AsyncQueueReader was able to read new portion of data from
SelectableChannel, whoch is associated with a
SelectionKey. Custom condition code could decide whether read data
is enough to call AsyncReadCallbackHandler.onReadCompleted() or
more data is expected.
- Author:
- Alexey Stashok
checkAsyncReadCompleted
boolean checkAsyncReadCompleted(SelectionKey key,
SocketAddress srcAddress,
ByteBuffer buffer)
- Method checks, whether data, which was read to the
ByteBuffer,
is read completely, or custom code expects more data.
- Parameters:
key - SelectionKeysrcAddress - SocketAddress remote address data was read frombuffer - ByteBuffer data was read to
- Returns:
- true, if data reading is completed, false - if mora data is expected
Copyright © 2009 SUN Microsystems. All Rights Reserved.