public class DefaultAuthFuture extends DefaultSshFuture<AuthFuture> implements AuthFuture
AuthFuture.log| Constructor and Description |
|---|
DefaultAuthFuture(Object lock) |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getException()
Returns the cause of the connection 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.
|
void |
verify()
Wait and verify that the authentication succeeded.
|
void |
verify(long timeoutMillis)
Wait and verify that the authentication succeeded within the specified timeout.
|
void |
verify(long timeout,
TimeUnit unit)
Wait and verify that the authentication succeeded within the specified timeout.
|
addListener, await, await, await, await0, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, getValue, isCanceled, isDone, removeListener, setValue, verifyResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancel, isCanceledaddListener, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, isDone, removeListenerpublic DefaultAuthFuture(Object lock)
public void verify()
throws IOException
AuthFutureverify in interface AuthFutureIOException - if the authentication failed for any reasonpublic void verify(long timeout,
TimeUnit unit)
throws IOException
AuthFutureverify in interface AuthFuturetimeout - The number of time unitsunit - The TimeUnit for the timeoutIOException - if the authentication failed for any reasonpublic void verify(long timeoutMillis)
throws IOException
AuthFutureverify in interface AuthFuturetimeoutMillis - Timeout in millisecondsIOException - if the authentication failed for any reasonpublic Throwable getException()
AuthFuturegetException in interface AuthFuturenull if the connect operation is not finished yet,
or if the connection attempt is successful.public boolean isSuccess()
isSuccess in interface AuthFuturetrue if the authentication operation is finished successfully.public boolean isFailure()
isFailure in interface AuthFuturefalse if the authentication operation failed.public void setAuthed(boolean authed)
AuthFuturesetAuthed in interface AuthFutureauthed - Authentication success statepublic void setException(Throwable exception)
AuthFuturesetException in interface AuthFutureexception - The caught ThrowableCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.