org.jboss.xnio.channels
Interface ReadableAllocatedMessageChannel
- All Superinterfaces:
- Channel, Closeable, Configurable, SuspendableReadChannel
- All Known Subinterfaces:
- AllocatedMessageChannel
public interface ReadableAllocatedMessageChannel
- extends SuspendableReadChannel
A channel that can receive messages. Such a channel receives whole messages only; the messages are stored
in pre-filled and pre-sized buffers.
receive
ByteBuffer receive()
throws IOException
- Receive a message. The returned buffer's position is 0, the mark is not set, the limit is the size of the
received message, and the capacity is some value greater than or equal to the limit. If the request would
block, an empty buffer is returned. If the channel is closed from a read direction,
null
is returned.
- Returns:
- a buffer containing the received message, or
null
if the channel is at EOF
- Throws:
IOException
- if an I/O error occurs
Copyright © 2008 JBoss, a division of Red Hat, Inc.