Interface MessageSourceConduit

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 Details

    • receive

      int receive(ByteBuffer dst) throws 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:
      IOException - if an I/O error occurs
    • receive

      long receive(ByteBuffer[] dsts, int offs, int len) throws IOException
      Receive a message.
      Parameters:
      offs - the offset into the array of buffers of the first buffer to read into
      len - the number of buffers to fill
      buffers - the buffers 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