Top Description Methods
org.xnio.conduits

public Interface MessageSourceConduit

extends SourceConduit
Known Direct Implementers
org.xnio.conduits.SynchronizedMessageSourceConduit, org.xnio.conduits.FramingMessageSourceConduit, org.xnio.conduits.AbstractMessageSourceConduit
Imports
java.io.IOException, java.nio.ByteBuffer

A message source conduit.
Author
David M. Lloyd

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the size of the received message, 0 if no message is available, and -1 if the message channel has reached an end-of-file condition
receive
(ByteBuffer
the buffer that will hold the message
dst
)

Receive a message.

public long

Returns:

the size of the received message, 0 if no message is available, and -1 if the message channel has reached an end-of-file condition
receive
(ByteBuffer[]
the buffers that will hold the message
dsts
,
int
the offset into the array of buffers of the first buffer to read into
offs
,
int
the number of buffers to fill
len
)

Receive a message.

Inherited from org.xnio.conduits.SourceConduit:
awaitReadableawaitReadablegetReadThreadisReadResumedisReadShutdownresumeReadssetReadReadyHandlersuspendReadsterminateReadswakeupReads

Method Detail

receiveback to summary
public int receive(ByteBuffer dst) throws IOException

Receive a message.

Parameters
dst:ByteBuffer

the buffer that will hold the message

Returns:int

the size of the received message, 0 if no message is available, and -1 if the message channel has reached an end-of-file condition

Exceptions
IOException:
if an I/O error occurs
receiveback to summary
public long receive(ByteBuffer[] dsts, int offs, int len) throws IOException

Receive a message.

Parameters
dsts:ByteBuffer[]

the buffers that will hold the message

offs:int

the offset into the array of buffers of the first buffer to read into

len:int

the number of buffers to fill

Returns:long

the size of the received message, 0 if no message is available, and -1 if the message channel has reached an end-of-file condition

Exceptions
IOException:
if an I/O error occurs