Class BlockingSenderImpl

  • All Implemented Interfaces:
    Sender

    public class BlockingSenderImpl
    extends Object
    implements Sender
    A sender that uses an output stream.
    Author:
    Stuart Douglas
    • Method Detail

      • send

        public void send​(ByteBuffer buffer,
                         IoCallback callback)
        Description copied from interface: Sender
        Write the given buffer using async IO, and calls the given callback on completion or error.
        Specified by:
        send in interface Sender
        Parameters:
        buffer - The buffer to send.
        callback - The callback
      • send

        public void send​(ByteBuffer[] buffer,
                         IoCallback callback)
        Description copied from interface: Sender
        Write the given buffers using async IO, and calls the given callback on completion or error.
        Specified by:
        send in interface Sender
        Parameters:
        buffer - The buffers to send.
        callback - The callback
      • send

        public void send​(ByteBuffer buffer)
        Description copied from interface: Sender
        Write the given buffer using async IO, and ends the exchange when done
        Specified by:
        send in interface Sender
        Parameters:
        buffer - The buffer to send.
      • send

        public void send​(ByteBuffer[] buffer)
        Description copied from interface: Sender
        Write the given buffers using async IO, and ends the exchange when done
        Specified by:
        send in interface Sender
        Parameters:
        buffer - The buffers to send.
      • send

        public void send​(String data,
                         IoCallback callback)
        Description copied from interface: Sender
        Write the given String using async IO, and calls the given callback on completion or error.

        The CharSequence is encoded to UTF8

        Specified by:
        send in interface Sender
        Parameters:
        data - The data to send
        callback - The callback
      • send

        public void send​(String data,
                         Charset charset,
                         IoCallback callback)
        Description copied from interface: Sender
        Write the given String using async IO, and calls the given callback on completion or error.
        Specified by:
        send in interface Sender
        Parameters:
        data - The buffer to end.
        charset - The charset to use
        callback - The callback
      • send

        public void send​(String data)
        Description copied from interface: Sender
        Write the given String using async IO, and ends the exchange when done

        The CharSequence is encoded to UTF8

        Specified by:
        send in interface Sender
        Parameters:
        data - The data to send
      • send

        public void send​(String data,
                         Charset charset)
        Description copied from interface: Sender
        Write the given String using async IO, and ends the exchange when done
        Specified by:
        send in interface Sender
        Parameters:
        data - The buffer to end.
        charset - The charset to use
      • transferFrom

        public void transferFrom​(FileChannel source,
                                 IoCallback callback)
        Description copied from interface: Sender
        Transfers all content from the specified file
        Specified by:
        transferFrom in interface Sender
        Parameters:
        source - the file channel to transfer
        callback - The callback
      • close

        public void close​(IoCallback callback)
        Description copied from interface: Sender
        Closes this sender asynchronously. The given callback is notified on completion
        Specified by:
        close in interface Sender
        Parameters:
        callback - The callback that is notified when all data has been flushed and the channel is closed
      • close

        public void close()
        Description copied from interface: Sender
        Closes this sender asynchronously
        Specified by:
        close in interface Sender