Class TcpClientEventAdapter

    • Method Detail

      • onSocketCreated

        public void onSocketCreated​(TcpClient tcpClient)
        Called when a socket has been created for the TCP client.
        Specified by:
        onSocketCreated in interface TcpClientEventHandler
        Parameters:
        tcpClient - the TCP client for which the socket was created
      • onConnecting

        public void onConnecting​(TcpClient tcpClient)
        Called when the TCP client begins attempting to establish a connection.
        Specified by:
        onConnecting in interface TcpClientEventHandler
        Parameters:
        tcpClient - the TCP client attempting to connect
      • onReconnecting

        public void onReconnecting​(TcpClient tcpClient)
        Called when the TCP client begins attempting to reconnect.
        Specified by:
        onReconnecting in interface TcpClientEventHandler
        Parameters:
        tcpClient - the TCP client attempting to reconnect
      • onConnectionEstablished

        public void onConnectionEstablished​(TcpClient tcpClient)
        Called when the TCP client establishes a connection.
        Specified by:
        onConnectionEstablished in interface TcpClientEventHandler
        Parameters:
        tcpClient - the TCP client that established the connection
      • onConnectionFailed

        public void onConnectionFailed​(TcpClient tcpClient)
        Called when a TCP connection attempt fails.
        Specified by:
        onConnectionFailed in interface TcpClientEventHandler
        Parameters:
        tcpClient - the TCP client whose connection attempt failed
      • onConnectionDropped

        public void onConnectionDropped​(TcpClient tcpClient,
                                        String msg,
                                        Exception ex)
        Called when an established TCP connection is dropped.
        Specified by:
        onConnectionDropped in interface TcpClientEventHandler
        Parameters:
        tcpClient - the TCP client whose connection was dropped
        msg - the message describing the connection drop
        ex - the exception associated with the connection drop
      • onConnectionClosed

        public void onConnectionClosed​(TcpClient tcpClient)
        Called when the TCP client's connection is closed.
        Specified by:
        onConnectionClosed in interface TcpClientEventHandler
        Parameters:
        tcpClient - the TCP client whose connection was closed
      • onConnectionAttemptAborted

        public void onConnectionAttemptAborted​(TcpClient tcpClient)
        Called when a TCP connection attempt is aborted.
        Specified by:
        onConnectionAttemptAborted in interface TcpClientEventHandler
        Parameters:
        tcpClient - the TCP client whose connection attempt was aborted
      • onReceivedAgent

        public void onReceivedAgent​(Agent agent)
        Called when an agent is received by the TCP client.

        This callback provides notification of received agents independently of normal agent dispatch to registered API implementations.

        Specified by:
        onReceivedAgent in interface TcpClientEventHandler
        Parameters:
        agent - the agent received by the TCP client
      • onSendingSyncAgent

        public void onSendingSyncAgent​(Agent agent)
        Called when the TCP client is sending a synchronous agent.
        Specified by:
        onSendingSyncAgent in interface TcpClientEventHandler
        Parameters:
        agent - the synchronous agent being sent
      • onReceivedReply

        public void onReceivedReply​(Reply reply)
        Called when a reply is received by the TCP client.
        Specified by:
        onReceivedReply in interface TcpClientEventHandler
        Parameters:
        reply - the reply received by the TCP client
      • onSendingAsyncAgent

        public void onSendingAsyncAgent​(Agent agent)
        Called when the TCP client is sending an asynchronous agent.
        Specified by:
        onSendingAsyncAgent in interface TcpClientEventHandler
        Parameters:
        agent - the asynchronous agent being sent
      • onWaitingToReconnect

        public void onWaitingToReconnect​(TcpClient tcpClient,
                                         long waitTime)
        Called when the TCP client is waiting before another reconnection attempt.
        Specified by:
        onWaitingToReconnect in interface TcpClientEventHandler
        Parameters:
        tcpClient - the TCP client waiting to reconnect
        waitTime - the reconnect delay in milliseconds