public class NettyMessageClientDecoderDelegate
extends org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
This decoder decodes the frame header and delegates the following work to the corresponding message decoders according to the message type. During this process The frame header and message header are only accumulated if they span received multiple netty buffers, and the data buffer is copied directly to the buffer of corresponding input channel to avoid more copying.
The format of the frame header is +------------------+------------------+--------+ | FRAME LENGTH (4) | MAGIC NUMBER (4) | ID (1) | +------------------+------------------+--------+
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx)
Releases resources when the channel is closed.
|
void |
channelRead(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic void channelActive(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerchannelActive in class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx)
throws Exception
CreditBasedPartitionRequestClientHandler is expected to catch
the exception and close the channel and trigger this notification.channelInactive in interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerchannelInactive in class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapterctx - The context of the channel close notification.Exceptionpublic void channelRead(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead in interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerchannelRead in class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapterExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.