Class PipeliningServerHandler.OutboundAccess

java.lang.Object
io.micronaut.http.server.netty.handler.PipeliningServerHandler.OutboundAccess
All Implemented Interfaces:
NettyWriteContext
Enclosing class:
PipeliningServerHandler

public final class PipeliningServerHandler.OutboundAccess extends Object implements NettyWriteContext
Class that allows writing the response for the request this object is associated with.
  • Method Details

    • alloc

      public io.netty.buffer.ByteBufAllocator alloc()
      Specified by:
      alloc in interface NettyWriteContext
      Returns:
      The bytebuf allocator.
    • attachment

      public void attachment(Object attachment)
      Set an attachment that is passed to RequestHandler.responseWritten(java.lang.Object). Defaults to null.
      Parameters:
      attachment - The attachment to forward
    • closeAfterWrite

      public void closeAfterWrite()
      Mark this channel to be closed after this response has been written.
    • writeFull

      public void writeFull(io.netty.handler.codec.http.FullHttpResponse response)
      Write a full response.
      Specified by:
      writeFull in interface NettyWriteContext
      Parameters:
      response - The response to write
    • writeStreamed

      public void writeStreamed(io.netty.handler.codec.http.HttpResponse response, Publisher<io.netty.handler.codec.http.HttpContent> content)
      Description copied from interface: NettyWriteContext
      Write a streamed response.
      Specified by:
      writeStreamed in interface NettyWriteContext
      Parameters:
      response - The response to write
      content - The body
    • writeChunked

      public void writeChunked(io.netty.handler.codec.http.HttpResponse response, io.netty.handler.codec.http.HttpChunkedInput chunkedInput)
      Description copied from interface: NettyWriteContext
      Write a response with a HttpChunkedInput body.
      Specified by:
      writeChunked in interface NettyWriteContext
      Parameters:
      response - The response. Must not be a FullHttpResponse
      chunkedInput - The response body
    • writeFile

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