Interface AuthFuture

All Superinterfaces:
org.apache.sshd.common.future.Cancellable, org.apache.sshd.common.future.HasException, org.apache.sshd.common.future.SshFuture<AuthFuture>, org.apache.sshd.common.future.VerifiableFuture<AuthFuture>, org.apache.sshd.common.future.WaitableFuture, org.apache.sshd.common.future.WithException
All Known Implementing Classes:
DefaultAuthFuture

public interface AuthFuture extends org.apache.sshd.common.future.SshFuture<AuthFuture>, org.apache.sshd.common.future.VerifiableFuture<AuthFuture>, org.apache.sshd.common.future.Cancellable
An SshFuture for asynchronous authentication requests.
Author:
Apache MINA SSHD Project
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    void
    setAuthed(boolean authed)
    Notifies that the session has been authenticated.
    void
    setCancellable(boolean cancellable)
    Enables or disables cancellation of this AuthFuture.
    boolean
    Tells whether Cancellable.cancel() was called on this AuthFuture.

    Methods inherited from interface org.apache.sshd.common.future.Cancellable

    cancel, getCancellation, isCanceled

    Methods inherited from interface org.apache.sshd.common.future.HasException

    getException

    Methods inherited from interface org.apache.sshd.common.future.SshFuture

    addListener, removeListener

    Methods inherited from interface org.apache.sshd.common.future.VerifiableFuture

    verify, verify, verify, verify, verify, verify, verify, verify

    Methods inherited from interface org.apache.sshd.common.future.WaitableFuture

    await, await, await, await, await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDone

    Methods inherited from interface org.apache.sshd.common.future.WithException

    setException
  • 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