Package org.apache.sshd.client.future
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
AnSshFuturefor asynchronous authentication requests.- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisFailure()booleanisSuccess()voidsetAuthed(boolean authed)Notifies that the session has been authenticated.voidsetCancellable(boolean cancellable)Enables or disables cancellation of thisAuthFuture.booleanwasCanceled()Tells whetherCancellable.cancel()was called on thisAuthFuture.-
Methods inherited from interface org.apache.sshd.common.future.Cancellable
cancel, getCancellation, isCanceled
-
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
-
Methods inherited from interface org.apache.sshd.common.future.WaitableFuture
await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDone
-
Methods inherited from interface org.apache.sshd.common.future.WithException
getException, setException
-
-
-
-
Method Detail
-
isSuccess
boolean isSuccess()
- Returns:
trueif the authentication operation is finished successfully. Note: calling this method while the operation is in progress returnsfalse. Should checkWaitableFuture.isDone()in order to ensure that the result is valid.
-
isFailure
boolean isFailure()
- Returns:
falseif 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 checkWaitableFuture.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 thisAuthFuture.This is a framework method; do not call directly.
- Parameters:
cancellable- whether this future is currently cancellable
-
wasCanceled
boolean wasCanceled()
Tells whetherCancellable.cancel()was called on thisAuthFuture.This is different from
Cancellable.isCanceled(). Cancelling 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 theCancelFuturemay actually beisCanceled()== false.AuthFuture.Cancellable.isCanceled()is thenfalse, too.- Returns:
trueifCancellable.cancel()was called,falseotherwise
-
-