Class Http2ContentDecompressor

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

    public class Http2ContentDecompressor
    extends io.netty.channel.ChannelInboundHandlerAdapter
    HTTP/2 content decompressor that transparently decompresses gzip/deflate response bodies. Installed on stream child channels when automatic decompression is enabled.

    Uses Netty's JdkZlibDecoder via an EmbeddedChannel for streaming decompression, forwarding decompressed data frames as they arrive rather than buffering the entire response.

    • Nested Class Summary

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelRead​(io.netty.channel.ChannelHandlerContext ctx, Object msg)  
      void handlerRemoved​(io.netty.channel.ChannelHandlerContext ctx)  
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, isSharable
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded
    • Constructor Detail

      • Http2ContentDecompressor

        public Http2ContentDecompressor​(boolean keepEncodingHeader)
    • Method Detail

      • channelRead

        public void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                Object msg)
                         throws Exception
        Specified by:
        channelRead in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        Exception
      • handlerRemoved

        public void handlerRemoved​(io.netty.channel.ChannelHandlerContext ctx)
        Specified by:
        handlerRemoved in interface io.netty.channel.ChannelHandler
        Overrides:
        handlerRemoved in class io.netty.channel.ChannelHandlerAdapter