Class ClientConnectionHandler

  • All Implemented Interfaces:,,

    public class ClientConnectionHandler
    extends ThreeWayHandshakeClientHandler<JoinMessage,​WelcomeMessage>
    This handler performs the handshake with the server and processes incoming messages during the session.

    The handshake is initiated by a JoinMessage sent by the client, which is answered with a WelcomeMessage from the server. The client must then confirm this message with a SuccessMessage.

    • Field Detail

      • timeout

        protected final Duration timeout
      • pipeline

        protected final Pipeline pipeline
      • networkId

        protected final int networkId
      • identity

        protected final Identity identity
      • timeoutFuture

        protected io.netty.util.concurrent.ScheduledFuture<?> timeoutFuture
    • Constructor Detail

      • ClientConnectionHandler

        public ClientConnectionHandler​(ClientEnvironment environment)
    • Method Detail

      • getLogger

        protected org.slf4j.Logger getLogger()
      • processUnexpectedMessageDuringHandshake

        protected void processUnexpectedMessageDuringHandshake​( ctx,
                                                               Message message)
      • processMessageAfterHandshake

        protected void processMessageAfterHandshake​( ctx,
                                                    Message message)
      • channelActive

        public void channelActive​( ctx)
                           throws Exception
        Specified by:
        channelActive in interface
        channelActive in class
      • startTimeoutGuard

        protected void startTimeoutGuard​( ctx)
      • rejectSession

        protected void rejectSession​( ctx,
                                     String error)
      • exceptionCaught

        public void exceptionCaught​( ctx,
                                    Throwable cause)
        Specified by:
        exceptionCaught in interface
        Specified by:
        exceptionCaught in interface
        exceptionCaught in class