## 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

Method Summary
`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.

Method Detail

### 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` - `SelectionKey`
    `srcAddress` - `SocketAddress` remote address data was read from
    `buffer` - `ByteBuffer` data was read to
  Returns:
    true, if data reading is completed, false - if mora data is expected

Copyright © 2008 SUN Microsystems. All Rights Reserved.