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) | +------------------+------------------+--------+
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerchannelActive 在类中 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 在接口中 org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerchannelInactive 在类中 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 在接口中 org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerchannelRead 在类中 org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapterExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.