Class ClientHandler<REQ extends MessageBody,RESP extends MessageBody>

java.lang.Object
org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerAdapter
org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
org.apache.flink.queryablestate.network.ClientHandler<REQ,RESP>
Type Parameters:
REQ - the type of request the client will send.
RESP - the type of response the client expects to receive.
All Implemented Interfaces:
org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler, org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler

@Internal public class ClientHandler<REQ extends MessageBody,RESP extends MessageBody> extends org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
The handler used by a Client to handling incoming messages.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler

    org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler.Sharable
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a handler with the callback.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    channelInactive(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx)
     
    void
    channelRead(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, Object msg)
     
    void
    exceptionCaught(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
     

    Methods inherited from class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered

    Methods inherited from class org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved
  • Constructor Details

    • ClientHandler

      public ClientHandler(String clientName, MessageSerializer<REQ,RESP> serializer, ClientHandlerCallback<RESP> callback)
      Creates a handler with the callback.
      Parameters:
      clientName - the name of the client.
      serializer - the serializer used to (de-)serialize messages.
      callback - Callback for responses.
  • Method Details

    • channelRead

      public void channelRead(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
      Specified by:
      channelRead in interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • exceptionCaught

      public void exceptionCaught(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
      Specified by:
      exceptionCaught in interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler
      Specified by:
      exceptionCaught in interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler
      Overrides:
      exceptionCaught in class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • channelInactive

      public void channelInactive(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelInactive in interface org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception