Package org.xnio.conduits
Interface MessageSourceConduit
- All Superinterfaces:
Conduit
,SourceConduit
- All Known Implementing Classes:
AbstractMessageSourceConduit
,FramingMessageSourceConduit
,SynchronizedMessageSourceConduit
A message source conduit.
- Author:
- David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptionint
receive
(ByteBuffer dst) Receive a message.long
receive
(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 Details
-
receive
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:
IOException
- if an I/O error occurs
-
receive
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:
IOException
- if an I/O error occurs
-