Class VeniceChunkedWriteHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
com.linkedin.venice.router.streaming.NettyChunkedWriteHandler
com.linkedin.venice.router.streaming.VeniceChunkedWriteHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler
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;-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.netty.util.AttributeKey<io.netty.channel.ChannelHandlerContext>static final io.netty.util.AttributeKey<VeniceChunkedWriteHandler> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) voidvoidwrite(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) Methods inherited from class com.linkedin.venice.router.streaming.NettyChunkedWriteHandler
channelInactive, channelWritabilityChanged, flush, handlerAdded, resumeTransferMethods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, readMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelReadComplete, channelRegistered, channelUnregistered, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerRemoved
-
Field Details
-
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 Details
-
VeniceChunkedWriteHandler
public VeniceChunkedWriteHandler()
-
-
Method Details
-
channelRead
- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
setWriteMessageCallback
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) - Specified by:
writein interfaceio.netty.channel.ChannelOutboundHandler- Overrides:
writein classNettyChunkedWriteHandler
-