public interface AuthFuture extends SshFuture<AuthFuture>, VerifiableFuture<AuthFuture>
SshFuture
for asynchronous authentication requests.Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the authentication attempt and notifies all threads waiting for this future.
|
Throwable |
getException()
Returns the cause of the authentication failure.
|
boolean |
isCanceled() |
boolean |
isFailure() |
boolean |
isSuccess() |
void |
setAuthed(boolean authed)
Notifies that the session has been authenticated.
|
void |
setException(Throwable exception)
Sets the exception caught due to connection failure and notifies all threads waiting for this future.
|
addListener, removeListener
await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDone
verify, verify, verify, verify
Throwable getException()
null
if the authentication operation is not finished yet, or if the connection attempt is
successful (use WaitableFuture.isDone()
to distinguish between the two).boolean isSuccess()
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.boolean isFailure()
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.boolean isCanceled()
true
if the connect operation has been canceled by cancel()
method.void setAuthed(boolean authed)
authed
- Authentication success statevoid setException(Throwable exception)
exception
- The caught Throwable
void cancel()
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.