public class DefaultConnectFuture extends DefaultVerifiableSshFuture<ConnectFuture> implements ConnectFuture
ConnectFuture.CANCELEDlog| Constructor and Description |
|---|
DefaultConnectFuture(Object id,
Object lock) |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getException()
Returns the cause of the connection failure.
|
ClientSession |
getSession() |
boolean |
isConnected() |
void |
setException(Throwable exception)
Sets the exception caught due to connection failure and notifies all threads waiting for this future.
|
void |
setSession(ClientSession session)
Sets the newly connected session and notifies all threads waiting for this future.
|
ConnectFuture |
verify(long timeout)
Wait and verify that the operation was successful
|
addListener, await0, cancel, getNumRegisteredListeners, getValue, isCanceled, isDone, notifyListeners, 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, waitcancel, getClientSession, isCanceledaddListener, removeListenerawait, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDoneverify, verify, verifygetSessionContextpublic ConnectFuture verify(long timeout) throws IOException
VerifiableFutureverify in interface VerifiableFuture<ConnectFuture>timeout - Wait timeout in millisecondsIOException - If failed to verify successfully on timepublic ClientSession getSession()
getSession in interface SessionHolder<ClientSession>public Throwable getException()
ConnectFuturegetException in interface ConnectFuturenull if the connect operation is not finished yet, or if the connection attempt is successful
(use WaitableFuture.isDone() to distinguish between the two)public boolean isConnected()
isConnected in interface ConnectFuturetrue if the connect operation is finished successfully.public void setSession(ClientSession session)
ConnectFuturesetSession in interface ConnectFuturesession - The ClientSessionpublic void setException(Throwable exception)
ConnectFuturesetException in interface ConnectFutureexception - The caught ThrowableCopyright © 2008–2025 The Apache Software Foundation. All rights reserved.