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 classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
Modifier and TypeFieldDescriptionstatic final io.netty.util.AttributeKey<io.netty.channel.ChannelHandlerContext>
static final io.netty.util.AttributeKey<VeniceChunkedWriteHandler>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
channelRead
(io.netty.channel.ChannelHandlerContext ctx, Object msg) void
void
write
(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, resumeTransfer
Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, read
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelReadComplete, channelRegistered, channelUnregistered, exceptionCaught, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, 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
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:
channelRead
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in 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:
write
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
write
in classNettyChunkedWriteHandler
-