Interface AuthFuture

All Superinterfaces:
Cancellable, SshFuture<AuthFuture>, VerifiableFuture<AuthFuture>, WaitableFuture, WithException
All Known Implementing Classes:
DefaultAuthFuture

public interface AuthFuture extends SshFuture<AuthFuture>, VerifiableFuture<AuthFuture>, Cancellable
An SshFuture for asynchronous authentication requests.
  • Method Details

    • 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.
    • 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
    • setCancellable

      void setCancellable(boolean cancellable)
      Enables or disables cancellation of this AuthFuture.

      This is a framework method; do not call directly.

      Parameters:
      cancellable - whether this future is currently cancellable
    • wasCanceled

      boolean wasCanceled()
      Tells whether Cancellable.cancel() was called on this AuthFuture.

      This is different from Cancellable.isCanceled(). Canceling an on-going authentication may not be possible; Cancellable.cancel() is only a request to cancel the authentication. That request may not be honored and the CancelFuture may actually be isCanceled() == false. AuthFuture.Cancellable.isCanceled() is then false, too.

      Returns:
      true if Cancellable.cancel() was called, false otherwise