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
AnSshFuture
for asynchronous authentication requests.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isFailure()
boolean
isSuccess()
void
setAuthed(boolean authed)
Notifies that the session has been authenticated.void
setCancellable(boolean cancellable)
Enables or disables cancellation of thisAuthFuture
.boolean
wasCanceled()
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:
true
if 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:
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 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()
. 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 theCancelFuture
may actually beisCanceled()
== false
.AuthFuture
.Cancellable.isCanceled()
is thenfalse
, too.- Returns:
true
ifCancellable.cancel()
was called,false
otherwise
-
-