public interface ConnectFuture extends SshFuture<ConnectFuture>
SshFuture for asynchronous connections requests.| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the connection attempt and notifies all threads waiting for
this future.
|
Throwable |
getException()
Returns the cause of the connection failure.
|
ClientSession |
getSession() |
boolean |
isCanceled() |
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, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, isDone, removeListenerClientSession getSession()
ClientSessionConnectFuture verify(long count, TimeUnit unit) throws IOException
count - The number of time units to waitunit - The TimeUnit for waitingConnectFutureIOException - If failed to verify the request on timeConnectFuture verify(long timeout) throws IOException
timeout - The wait timeout in millisecondsConnectFutureIOException - If failed to verify the request on timeThrowable getException()
null if the connect operation is not finished yet,
or if the connection attempt is successful.boolean isConnected()
true if the connect operation is finished successfully.boolean isCanceled()
true if the connect operation has been canceled by
cancel() method.void setSession(ClientSession session)
session - The ClientSessionvoid setException(Throwable exception)
exception - The caught Throwablevoid cancel()
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.