REQ - the type of request the client will send.RESP - the type of response the client expects to receive.public class ClientHandler<REQ extends MessageBody,RESP extends MessageBody>
extends org.apache.paimon.shade.netty4.io.netty.channel.ChannelInboundHandlerAdapter
NetworkClient to handling incoming messages.| Constructor and Description |
|---|
ClientHandler(MessageSerializer<REQ,RESP> serializer,
ClientHandlerCallback<RESP> callback)
Creates a handler with the callback.
|
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(org.apache.paimon.shade.netty4.io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(org.apache.paimon.shade.netty4.io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
exceptionCaught(org.apache.paimon.shade.netty4.io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic ClientHandler(MessageSerializer<REQ,RESP> serializer, ClientHandlerCallback<RESP> callback)
serializer - the serializer used to (de-)serialize messages.callback - Callback for responses.public void channelRead(org.apache.paimon.shade.netty4.io.netty.channel.ChannelHandlerContext ctx,
Object msg)
channelRead in interface org.apache.paimon.shade.netty4.io.netty.channel.ChannelInboundHandlerchannelRead in class org.apache.paimon.shade.netty4.io.netty.channel.ChannelInboundHandlerAdapterpublic void exceptionCaught(org.apache.paimon.shade.netty4.io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught in interface org.apache.paimon.shade.netty4.io.netty.channel.ChannelHandlerexceptionCaught in interface org.apache.paimon.shade.netty4.io.netty.channel.ChannelInboundHandlerexceptionCaught in class org.apache.paimon.shade.netty4.io.netty.channel.ChannelInboundHandlerAdapterpublic void channelInactive(org.apache.paimon.shade.netty4.io.netty.channel.ChannelHandlerContext ctx)
channelInactive in interface org.apache.paimon.shade.netty4.io.netty.channel.ChannelInboundHandlerchannelInactive in class org.apache.paimon.shade.netty4.io.netty.channel.ChannelInboundHandlerAdapterCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.