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, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public 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.ChannelInboundHandler
channelActive
in class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
Exception
public 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.ChannelInboundHandler
channelInactive
in class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
ctx
- The context of the channel close notification.Exception
public 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.ChannelInboundHandler
channelRead
in class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.