Class HeartbeatSetupHandler.Client

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
io.atomix.cluster.messaging.impl.HeartbeatSetupHandler
io.atomix.cluster.messaging.impl.HeartbeatSetupHandler.Client
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler
Enclosing class:
HeartbeatSetupHandler

public static final class HeartbeatSetupHandler.Client extends HeartbeatSetupHandler
The client sends a message to exchange the heartbeatTimeout with the server and then waits for the server to confirm that heartbeats are enabled. If the server supports heartbeats, it sets up HeartbeatHandler.Client
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.atomix.cluster.messaging.impl.HeartbeatSetupHandler

    HeartbeatSetupHandler.Client, HeartbeatSetupHandler.Server

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields inherited from class io.atomix.cluster.messaging.impl.HeartbeatSetupHandler

    afterHandler, forwardHeartbeats, headerDecoder, headerEncoder, log
  • Constructor Summary

    Constructors
    Constructor
    Description
    Client(String afterHandler, org.slf4j.Logger log, AtomicLong messageIdGenerator, Address advertisedAddress, Duration heartbeatTimeout, Duration heartbeatInterval, boolean forwardHeartbeats)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
     
    void
    handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
     

    Methods inherited from class io.netty.channel.ChannelDuplexHandler

    bind, close, connect, deregister, disconnect, flush, read, write

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerRemoved
  • Constructor Details

    • Client

      public Client(String afterHandler, org.slf4j.Logger log, AtomicLong messageIdGenerator, Address advertisedAddress, Duration heartbeatTimeout, Duration heartbeatInterval, boolean forwardHeartbeats)
  • Method Details

    • handlerAdded

      public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      handlerAdded in interface io.netty.channel.ChannelHandler
      Overrides:
      handlerAdded in class io.netty.channel.ChannelHandlerAdapter
      Throws:
      Exception
    • channelRead

      public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
      Specified by:
      channelRead in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception