Class HttpResponseEncoder

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelOutboundHandler

    @Internal
    @Sharable
    public class HttpResponseEncoder
    extends io.netty.handler.codec.MessageToMessageEncoder<io.micronaut.http.MutableHttpResponse<?>>
    Encodes Micronaut's representation of an MutableHttpResponse.
    Since:
    1.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ID  
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpResponseEncoder​(io.micronaut.http.codec.MediaTypeCodecRegistry mediaTypeCodecRegistry, io.micronaut.http.server.HttpServerConfiguration serverConfiguration)
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void encode​(io.netty.channel.ChannelHandlerContext context, io.micronaut.http.MutableHttpResponse<?> response, java.util.List<java.lang.Object> out)  
      • Methods inherited from class io.netty.handler.codec.MessageToMessageEncoder

        acceptOutboundMessage, write
      • Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter

        bind, close, connect, deregister, disconnect, flush, read
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.netty.channel.ChannelHandler

        exceptionCaught, handlerAdded, handlerRemoved
    • Constructor Detail

      • HttpResponseEncoder

        public HttpResponseEncoder​(io.micronaut.http.codec.MediaTypeCodecRegistry mediaTypeCodecRegistry,
                                   io.micronaut.http.server.HttpServerConfiguration serverConfiguration)
        Default constructor.
        Parameters:
        mediaTypeCodecRegistry - The media type registry
        serverConfiguration - The server config
    • Method Detail

      • encode

        protected void encode​(io.netty.channel.ChannelHandlerContext context,
                              io.micronaut.http.MutableHttpResponse<?> response,
                              java.util.List<java.lang.Object> out)
        Specified by:
        encode in class io.netty.handler.codec.MessageToMessageEncoder<io.micronaut.http.MutableHttpResponse<?>>