Interface NettyWriteContext

All Known Implementing Classes:
PipeliningServerHandler.OutboundAccess

@Internal public interface NettyWriteContext
This interface is used to write the different kinds of netty responses.
Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull io.netty.buffer.ByteBufAllocator
     
    void
    writeChunked(@NonNull io.netty.handler.codec.http.HttpResponse response, @NonNull io.netty.handler.codec.http.HttpChunkedInput chunkedInput)
    Write a response with a HttpChunkedInput body.
    void
    writeFile(@NonNull io.netty.handler.codec.http.HttpResponse response, @NonNull RandomAccessFile randomAccessFile, long position, long contentLength)
    Write a response with a body that is a section of a RandomAccessFile.
    void
    writeFull(@NonNull io.netty.handler.codec.http.FullHttpResponse response)
    Write a full response.
    void
    writeStreamed(@NonNull io.netty.handler.codec.http.HttpResponse response, @NonNull Publisher<io.netty.handler.codec.http.HttpContent> content)
    Write a streamed response.
  • Method Details

    • alloc

      @NonNull @NonNull io.netty.buffer.ByteBufAllocator alloc()
      Returns:
      The bytebuf allocator.
    • writeFull

      void writeFull(@NonNull @NonNull io.netty.handler.codec.http.FullHttpResponse response)
      Write a full response.
      Parameters:
      response - The response to write
    • writeStreamed

      void writeStreamed(@NonNull @NonNull io.netty.handler.codec.http.HttpResponse response, @NonNull @NonNull Publisher<io.netty.handler.codec.http.HttpContent> content)
      Write a streamed response.
      Parameters:
      response - The response to write
      content - The body
    • writeChunked

      void writeChunked(@NonNull @NonNull io.netty.handler.codec.http.HttpResponse response, @NonNull @NonNull io.netty.handler.codec.http.HttpChunkedInput chunkedInput)
      Write a response with a HttpChunkedInput body.
      Parameters:
      response - The response. Must not be a FullHttpResponse
      chunkedInput - The response body
    • writeFile

      void writeFile(@NonNull @NonNull io.netty.handler.codec.http.HttpResponse response, @NonNull @NonNull RandomAccessFile randomAccessFile, long position, long contentLength)
      Write a response with a body that is a section of a RandomAccessFile.
      Parameters:
      response - The response. Must not be a FullHttpResponse
      randomAccessFile - File to read from
      position - Start position
      contentLength - Length of the section to send