Class DefaultConnectFuture

    • Constructor Detail

      • DefaultConnectFuture

        public DefaultConnectFuture​(java.lang.Object id,
                                    java.lang.Object lock)
    • Method Detail

      • verify

        public ConnectFuture verify​(long timeout)
                             throws java.io.IOException
        Description copied from interface: VerifiableFuture
        Wait and verify that the operation was successful
        Specified by:
        verify in interface VerifiableFuture<ConnectFuture>
        Parameters:
        timeout - Wait timeout in milliseconds
        Returns:
        The (same) future instance
        Throws:
        java.io.IOException - If failed to verify successfully on time
      • getException

        public java.lang.Throwable getException()
        Description copied from interface: ConnectFuture
        Returns the cause of the connection failure.
        Specified by:
        getException in interface ConnectFuture
        Returns:
        null if the connect operation is not finished yet, or if the connection attempt is successful (use WaitableFuture.isDone() to distinguish between the two)
      • isConnected

        public boolean isConnected()
        Specified by:
        isConnected in interface ConnectFuture
        Returns:
        true if the connect operation is finished successfully.
      • setSession

        public void setSession​(ClientSession session)
        Description copied from interface: ConnectFuture
        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.
        Specified by:
        setSession in interface ConnectFuture
        Parameters:
        session - The ClientSession
      • setException

        public void setException​(java.lang.Throwable exception)
        Description copied from interface: ConnectFuture
        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.
        Specified by:
        setException in interface ConnectFuture
        Parameters:
        exception - The caught Throwable