Top Description Constructors Methods
org.xnio.conduits

public abstract Class AbstractMessageSourceConduit<D extends MessageSourceConduit>

extends AbstractSourceConduit<D extends MessageSourceConduit>
implements MessageSourceConduit
Class Inheritance
All Implemented Interfaces
org.xnio.conduits.MessageSourceConduit, org.xnio.conduits.SourceConduit, org.xnio.conduits.Conduit
Imports
java.io.IOException, java.nio.ByteBuffer

An abstract base class for filtering message source conduits.
Author
David M. Lloyd

Constructor Summary

AccessConstructor and Description
protected
AbstractMessageSourceConduit(final D
the delegate conduit to set
next
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public int
receive(final ByteBuffer
the buffer that will hold the message
dst
)

Implements org.xnio.conduits.MessageSourceConduit.receive.

Receive a message.

public long
receive(final ByteBuffer[]
the buffers that will hold the message
dsts
,
final int
the offset into the array of buffers of the first buffer to read into
offs
,
final int
the number of buffers to fill
len
)

Implements org.xnio.conduits.MessageSourceConduit.receive.

Receive a message.

Inherited from org.xnio.conduits.AbstractSourceConduit:
awaitReadableawaitReadablegetReadThreadisReadResumedisReadShutdownresumeReadssetReadReadyHandlersuspendReadsterminateReadswakeupReads

Constructor Detail

AbstractMessageSourceConduitback to summary
protected AbstractMessageSourceConduit(final D next)

Construct a new instance.

Parameters
next:D

the delegate conduit to set

Method Detail

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

Implements org.xnio.conduits.MessageSourceConduit.receive.

Doc from org.xnio.conduits.MessageSourceConduit.receive.

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(final ByteBuffer[] dsts, final int offs, final int len) throws IOException

Implements org.xnio.conduits.MessageSourceConduit.receive.

Doc from org.xnio.conduits.MessageSourceConduit.receive.

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