public class DefaultAuthFuture extends DefaultCancellableSshFuture<AuthFuture> implements AuthFuture
AuthFuture.log| Constructor and Description |
|---|
DefaultAuthFuture(Object id,
Object lock) |
| Modifier and Type | Method and Description |
|---|---|
CancelFuture |
cancel()
Note that returned
CancelFuture may also be fulfilled unsuccessfully (i.e., (DefaultSshFuture.isDone()
&& !DefaultCancellableSshFuture.isCanceled()) == true. |
CancelFuture |
getCancellation() |
boolean |
isFailure() |
boolean |
isSuccess() |
void |
setAuthed(boolean authed)
Notifies that the session has been authenticated.
|
void |
setCancellable(boolean cancellable)
Enables or disables cancellation of this
AuthFuture. |
AuthFuture |
verify(long timeoutMillis,
CancelOption... options) |
boolean |
wasCanceled()
Tells whether
Cancellable.cancel() was called on this AuthFuture. |
createCancellation, getException, isCanceled, setExceptionaddListener, await0, getNumRegisteredListeners, getValue, isDone, notifyListeners, onValueSet, removeListener, setValue, toStringasListener, asT, await, awaitUninterruptibly, formatExceptionMessage, getId, notifyListener, verifyResultdebug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, removeListenerawait, await, await, await, await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDoneverify, verify, verify, verify, verify, verify, verifyisCanceledsetExceptiongetExceptionpublic AuthFuture verify(long timeoutMillis, CancelOption... options) throws IOException
verify in interface VerifiableFuture<AuthFuture>IOExceptionpublic boolean isSuccess()
isSuccess in interface AuthFuturetrue 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.public boolean isFailure()
isFailure in interface AuthFuturefalse 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.public void setAuthed(boolean authed)
AuthFuturesetAuthed in interface AuthFutureauthed - Authentication success statepublic CancelFuture cancel()
CancelFuture may also be fulfilled unsuccessfully (i.e., (DefaultSshFuture.isDone()
&& !DefaultCancellableSshFuture.isCanceled()) == true.cancel in interface Cancellablecancel in class DefaultCancellableSshFuture<AuthFuture>CancelFuture that can be used to wait until the cancellation has been effected or the
AuthFuture has been fulfilled; never null.public CancelFuture getCancellation()
getCancellation in interface CancellablegetCancellation in class DefaultCancellableSshFuture<AuthFuture>public boolean wasCanceled()
AuthFutureCancellable.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.
wasCanceled in interface AuthFuturetrue if Cancellable.cancel() was called, false otherwisepublic void setCancellable(boolean cancellable)
AuthFutureAuthFuture.
This is a framework method; do not call directly.
setCancellable in interface AuthFuturecancellable - whether this future is currently cancellableCopyright © 2008–2024 The Apache Software Foundation. All rights reserved.