Class AbstractMessageSourceConduit<D extends MessageSourceConduit>

java.lang.Object
org.xnio.conduits.AbstractConduit<D>
org.xnio.conduits.AbstractSourceConduit<D>
org.xnio.conduits.AbstractMessageSourceConduit<D>
All Implemented Interfaces:
Conduit, MessageSourceConduit, SourceConduit

public abstract class AbstractMessageSourceConduit<D extends MessageSourceConduit> extends AbstractSourceConduit<D> implements MessageSourceConduit
An abstract base class for filtering message source conduits.
Author:
David M. Lloyd
  • Constructor Details

    • AbstractMessageSourceConduit

      protected AbstractMessageSourceConduit(D next)
      Construct a new instance.
      Parameters:
      next - the delegate conduit to set
  • Method Details

    • receive

      public int receive(ByteBuffer dst) throws IOException
      Description copied from interface: MessageSourceConduit
      Receive a message.
      Specified by:
      receive in interface MessageSourceConduit
      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

      public long receive(ByteBuffer[] dsts, int offs, int len) throws IOException
      Description copied from interface: MessageSourceConduit
      Receive a message.
      Specified by:
      receive in interface MessageSourceConduit
      Parameters:
      offs - the offset into the array of buffers of the first buffer to read into
      len - 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