Interface NettyEntityWriter

All Known Implementing Classes:
NettyEntityWriter.DelayedEntityWriter, NettyEntityWriter.DirectEntityWriter

public interface NettyEntityWriter
The Entity Writer is used to write entity in Netty. One implementation is delayed, so that the complete message length can be set to Content-Length header.
  • Method Details

    • write

      void write(Object object)
      Writes the Object to the channel
      Parameters:
      object - object to be written
    • writeAndFlush

      void writeAndFlush(Object object)
      Writes the Object to the channel and flush.
      Parameters:
      object - object to be written
    • flush

      void flush() throws IOException
      Flushes the writen objects. Can throw IOException.
      Throws:
      IOException
    • getChunkedInput

      io.netty.handler.stream.ChunkedInput getChunkedInput()
      Get the netty Chunked Input to be written.
      Returns:
      The Chunked input instance
    • getOutputStream

      OutputStream getOutputStream()
      Get the OutputStream used to write an entity
      Returns:
      the OutputStream to write an entity
    • getLength

      long getLength()
      Get the length of the entity written to the OutputStream
      Returns:
    • getType

      Return Type of
      Returns:
    • getInstance

      static NettyEntityWriter getInstance(ClientRequest clientRequest, io.netty.channel.Channel channel)