Class ResponseCachingSender

  • All Implemented Interfaces:
    Sender

    public class ResponseCachingSender
    extends Object
    implements Sender
    Author:
    Stuart Douglas
    • Method Detail

      • send

        public void send​(ByteBuffer src,
                         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:
        src - The buffer to send.
        callback - The callback
      • send

        public void send​(ByteBuffer[] srcs,
                         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:
        srcs - The buffers to send.
        callback - The callback
      • send

        public void send​(ByteBuffer src)
        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:
        src - The buffer to send.
      • send

        public void send​(ByteBuffer[] srcs)
        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:
        srcs - 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 channel,
                                 IoCallback callback)
        Description copied from interface: Sender
        Transfers all content from the specified file
        Specified by:
        transferFrom in interface Sender
        Parameters:
        channel - 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