|
XNIO API 2.1.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ReadableAllocatedMessageChannel

A channel that can receive messages. Such a channel receives whole messages only; the messages are stored in pre-filled and pre-sized buffers.
| Field Summary | |
|---|---|
static ByteBuffer |
EMPTY
The special marker indicating an empty message. |
static ByteBuffer |
EOF
The special marker for end-of-file. |
static ByteBuffer |
GIANT
The special marker indicating that the input buffer was overrun. |
static ByteBuffer |
RUNT
The special marker indicating that the input message was shorter than its declared length. |
static ByteBuffer |
WOULD_BLOCK
The special marker indicating that the receive request would block. |
| Method Summary | |
|---|---|
ChannelListener.Setter<? extends ReadableAllocatedMessageChannel> |
getCloseSetter()
Get the setter which can be used to change the close listener for this channel. |
ChannelListener.Setter<? extends ReadableAllocatedMessageChannel> |
getReadSetter()
Get the setter which can be used to change the read listener for this channel. |
ByteBuffer |
receive()
Receive a message. |
| Methods inherited from interface org.jboss.xnio.channels.SuspendableReadChannel |
|---|
awaitReadable, awaitReadable, resumeReads, shutdownReads, suspendReads |
| Methods inherited from interface java.nio.channels.Channel |
|---|
close, isOpen |
| Methods inherited from interface org.jboss.xnio.channels.Configurable |
|---|
getOption, setOption, supportsOption |
| Field Detail |
|---|
static final ByteBuffer EOF
static final ByteBuffer WOULD_BLOCK
static final ByteBuffer GIANT
static final ByteBuffer RUNT
static final ByteBuffer EMPTY
| Method Detail |
|---|
ByteBuffer receive()
throws IOException
WOULD_BLOCK is returned. If the channel is closed from a read direction, EOF is returned.
If an oversized message was received, the special GIANT marker is returned, followed by the truncated
message. If a zero-length message is received, EMPTY is returned.
IOException - if an I/O error occursChannelListener.Setter<? extends ReadableAllocatedMessageChannel> getReadSetter()
getReadSetter in interface SuspendableReadChannelChannelListener.Setter<? extends ReadableAllocatedMessageChannel> getCloseSetter()
getCloseSetter in interface CloseableChannelgetCloseSetter in interface SuspendableReadChannel
|
XNIO API 2.1.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||