Class VeniceChunkedWriteHandler

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

    public class VeniceChunkedWriteHandler
    extends NettyChunkedWriteHandler
    This class is the wrapper of ChunkedWriteHandler, and essentially it will introduce the following logic: 1. Register the ChannelHandlerContext and VeniceChunkedWriteHandler in the request since those objects are not available to Venice directly when using DDS lib; 2. Intercept all the writes to delegate the pre-processing to VeniceChunkedResponse before proceeding;
    • Field Detail

      • CHUNKED_WRITE_HANDLER_ATTRIBUTE_KEY

        public static final io.netty.util.AttributeKey<VeniceChunkedWriteHandler> CHUNKED_WRITE_HANDLER_ATTRIBUTE_KEY
      • CHANNEL_HANDLER_CONTEXT_ATTRIBUTE_KEY

        public static final io.netty.util.AttributeKey<io.netty.channel.ChannelHandlerContext> CHANNEL_HANDLER_CONTEXT_ATTRIBUTE_KEY
    • Constructor Detail

      • VeniceChunkedWriteHandler

        public VeniceChunkedWriteHandler()
    • Method Detail

      • channelRead

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

        public void write​(io.netty.channel.ChannelHandlerContext ctx,
                          java.lang.Object msg,
                          io.netty.channel.ChannelPromise promise)
        Specified by:
        write in interface io.netty.channel.ChannelOutboundHandler
        Overrides:
        write in class NettyChunkedWriteHandler