public class DefaultAuthFuture extends DefaultVerifiableSshFuture<AuthFuture> implements AuthFuture
AuthFuture.CANCELEDlog| Constructor and Description |
|---|
DefaultAuthFuture(Object lock) |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getException()
Returns the cause of the authentication failure.
|
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.
|
AuthFuture |
verify(long timeoutMillis)
Wait and verify that the operation was successful
|
addListener, await0, cancel, getNumRegisteredListeners, getValue, isCanceled, isDone, notifyListeners, removeListener, setValueasListener, asT, await, awaitUninterruptibly, notifyListener, verifyResultgetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancel, isCanceledaddListener, removeListenerawait, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, isDoneverify, verifypublic DefaultAuthFuture(Object lock)
public AuthFuture verify(long timeoutMillis) throws IOException
VerifiableFutureverify in interface VerifiableFuture<AuthFuture>timeoutMillis - Wait timeout in millisecondsIOException - If failed to verify successfully on timepublic Throwable getException()
AuthFuturegetException in interface AuthFuturenull if the authentication operation is not finished yet,
or if the connection attempt is successful (use WaitableFuture.isDone() to distinguish
between the two).public 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 void setException(Throwable exception)
AuthFuturesetException in interface AuthFutureexception - The caught ThrowableCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.