Interface IoConnectFuture

    • Method Detail

      • getSession

        IoSession getSession()
        Returns:
        The current IoSession - may be null if connect operation not finished yet or attempt has failed
        See Also:
        getException()
      • getException

        Throwable getException()
        Returns the cause of the connection failure.
        Returns:
        null if the connect operation is not finished yet, or if the connection attempt is successful.
        See Also:
        getSession()
      • isConnected

        boolean isConnected()
        Returns:
        true if the connect operation is finished successfully.
      • isCanceled

        boolean isCanceled()
        Returns:
        true if the connect operation has been canceled by cancel() method.
      • setSession

        void setSession​(IoSession session)
        Sets the newly connected session and notifies all threads waiting for this future. This method is invoked by SSHD internally. Please do not call this method directly.
        Parameters:
        session - The connected IoSession
      • setException

        void setException​(Throwable exception)
        Sets the exception caught due to connection failure and notifies all threads waiting for this future. This method is invoked by SSHD internally. Please do not call this method directly.
        Parameters:
        exception - The caught Throwable
      • cancel

        void cancel()
        Cancels the connection attempt and notifies all threads waiting for this future.