|
XNIO API 2.0.2.GA | |||||||||
| 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 java.nio.ByteBuffer |
EMPTY
The special marker indicating an empty message. |
static java.nio.ByteBuffer |
EOF
The special marker for end-of-file. |
static java.nio.ByteBuffer |
GIANT
The special marker indicating that the input buffer was overrun. |
static java.nio.ByteBuffer |
RUNT
The special marker indicating that the input message was shorter than its declared length. |
static java.nio.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 handler for this channel. |
ChannelListener.Setter<? extends ReadableAllocatedMessageChannel> |
getReadSetter()
Get the setter which can be used to change the read handler for this channel. |
java.nio.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 java.nio.ByteBuffer EOF
static final java.nio.ByteBuffer WOULD_BLOCK
static final java.nio.ByteBuffer GIANT
static final java.nio.ByteBuffer RUNT
static final java.nio.ByteBuffer EMPTY
| Method Detail |
|---|
java.nio.ByteBuffer receive()
throws java.io.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.
java.io.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.0.2.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||