public class DefaultConnectFuture extends DefaultSshFuture<ConnectFuture> implements ConnectFuture
ConnectFuture.log| Constructor and Description |
|---|
DefaultConnectFuture(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) |
ConnectFuture |
verify(long count,
TimeUnit unit)
Wait and verify that connection succeeded within 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 DefaultConnectFuture(Object lock)
public ConnectFuture verify(long count, TimeUnit unit) throws IOException
ConnectFutureverify in interface ConnectFuturecount - The number of time units to waitunit - The TimeUnit for waitingConnectFutureIOException - If failed to verify the request on timepublic ConnectFuture verify(long timeout) throws IOException
verify in interface ConnectFuturetimeout - The wait timeout in millisecondsConnectFutureIOException - If failed to verify the request on timepublic ClientSession getSession()
getSession in interface ConnectFutureClientSessionpublic Throwable getException()
ConnectFuturegetException in interface ConnectFuturenull if the connect operation is not finished yet,
or if the connection attempt is successful.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–2015 The Apache Software Foundation. All rights reserved.