-
- All Superinterfaces:
Conduit
,SourceConduit
- All Known Implementing Classes:
AbstractMessageSourceConduit
,FramingMessageSourceConduit
,SynchronizedMessageSourceConduit
public interface MessageSourceConduit extends SourceConduit
A message source conduit.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
receive(java.nio.ByteBuffer dst)
Receive a message.long
receive(java.nio.ByteBuffer[] dsts, int offs, int len)
Receive a message.-
Methods inherited from interface org.xnio.conduits.SourceConduit
awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, terminateReads, wakeupReads
-
-
-
-
Method Detail
-
receive
int receive(java.nio.ByteBuffer dst) throws java.io.IOException
Receive a message.- Parameters:
buffer
- the buffer that will hold the message- 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
- Throws:
java.io.IOException
- if an I/O error occurs
-
receive
long receive(java.nio.ByteBuffer[] dsts, int offs, int len) throws java.io.IOException
Receive a message.- Parameters:
buffers
- the buffers that will hold the messageoffs
- the offset into the array of buffers of the first buffer to read intolen
- the number of buffers to fill- 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
- Throws:
java.io.IOException
- if an I/O error occurs
-
-