Interface DataWriter

All Known Implementing Classes:
SocketWriter

public interface DataWriter
Write data to the underlying transport (most likely a socket). Do not combine write(io.helidon.common.buffers.BufferData) and writeNow(io.helidon.common.buffers.BufferData) to a single underlying transport, unless you can guarantee there will not be a race between these two methods.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    write(BufferData buffer)
    Write buffer, may delay writing and may write on a different thread.
    void
    write(BufferData... buffers)
    Write buffers, may delay writing and may write on a different thread.
    void
    Write buffer to underlying transport blocking until the buffer is written.
    void
    writeNow(BufferData... buffers)
    Write buffers to underlying transport blocking until the buffers are written.
  • Method Details

    • write

      void write(BufferData... buffers)
      Write buffers, may delay writing and may write on a different thread. This method also may combine multiple calls into a single write to the underlying transport.
      Parameters:
      buffers - buffers to write
    • write

      void write(BufferData buffer)
      Write buffer, may delay writing and may write on a different thread. This method also may combine multiple calls into a single write to the underlying transport.
      Parameters:
      buffer - buffer to write
    • writeNow

      void writeNow(BufferData... buffers)
      Write buffers to underlying transport blocking until the buffers are written.
      Parameters:
      buffers - buffers to write
    • writeNow

      void writeNow(BufferData buffer)
      Write buffer to underlying transport blocking until the buffer is written.
      Parameters:
      buffer - buffer to write