Interface AuthFuture

    • Method Detail

      • getException

        Throwable getException()
        Returns the cause of the authentication failure.
        Returns:
        null if the authentication operation is not finished yet, or if the connection attempt is successful (use WaitableFuture.isDone() to distinguish between the two).
      • isSuccess

        boolean isSuccess()
        Returns:
        true if the authentication operation is finished successfully. Note: calling this method while the operation is in progress returns false. Should check WaitableFuture.isDone() in order to ensure that the result is valid.
      • isFailure

        boolean isFailure()
        Returns:
        false if the authentication operation failed. Note: the operation is considered failed if an exception is received instead of a success/fail response code or the operation is in progress. Should check WaitableFuture.isDone() in order to ensure that the result is valid.
      • isCanceled

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

        void setAuthed​(boolean authed)
        Notifies that the session has been authenticated. This method is invoked by SSHD internally. Please do not call this method directly.
        Parameters:
        authed - Authentication success state
      • 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 authentication attempt and notifies all threads waiting for this future.