Package org.apache.fluss.kafka
Class KafkaCommandDecoder
- java.lang.Object
-
- org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerAdapter
-
- org.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
-
- org.apache.fluss.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<org.apache.fluss.shaded.netty4.io.netty.buffer.ByteBuf>
-
- org.apache.fluss.kafka.KafkaCommandDecoder
-
- All Implemented Interfaces:
org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandler,org.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandler
public class KafkaCommandDecoder extends org.apache.fluss.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<org.apache.fluss.shaded.netty4.io.netty.buffer.ByteBuf>A decoder that decodes the incoming ByteBuf into Kafka requests and sends them to the corresponding RequestChannel.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContextctxprotected AtomicBooleanisActiveprotected SocketAddressremoteAddress
-
Constructor Summary
Constructors Constructor Description KafkaCommandDecoder(org.apache.fluss.rpc.netty.server.RequestChannel[] requestChannels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchannelActive(org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx)voidchannelInactive(org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx)voidchannelRead0(org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, org.apache.fluss.shaded.netty4.io.netty.buffer.ByteBuf buffer)protected voidclose()voidexceptionCaught(org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, Throwable cause)voiduserEventTriggered(org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, Object evt)-
Methods inherited from class org.apache.fluss.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
-
Methods inherited from class org.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
-
Methods inherited from class org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Field Detail
-
isActive
protected final AtomicBoolean isActive
-
ctx
protected volatile org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx
-
remoteAddress
protected SocketAddress remoteAddress
-
-
Method Detail
-
channelRead0
public void channelRead0(org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, org.apache.fluss.shaded.netty4.io.netty.buffer.ByteBuf buffer) throws Exception- Specified by:
channelRead0in classorg.apache.fluss.shaded.netty4.io.netty.channel.SimpleChannelInboundHandler<org.apache.fluss.shaded.netty4.io.netty.buffer.ByteBuf>- Throws:
Exception
-
channelActive
public void channelActive(org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx) throws Exception- Specified by:
channelActivein interfaceorg.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classorg.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
channelInactive
public void channelInactive(org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx) throws Exception- Specified by:
channelInactivein interfaceorg.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classorg.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
userEventTriggered
public void userEventTriggered(org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception- Specified by:
userEventTriggeredin interfaceorg.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandler- Overrides:
userEventTriggeredin classorg.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
close
protected void close()
-
exceptionCaught
public void exceptionCaught(org.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception- Specified by:
exceptionCaughtin interfaceorg.apache.fluss.shaded.netty4.io.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceorg.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classorg.apache.fluss.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
-