public interface OpenFuture extends SshFuture<OpenFuture>
SshFuture for asynchronous channel opening 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.
|
boolean |
isCanceled() |
boolean |
isOpened() |
void |
setException(Throwable exception)
Sets the exception caught due to connection failure and notifies all
threads waiting for this future.
|
void |
setOpened()
Sets the newly connected session and notifies all threads waiting for
this future.
|
void |
verify()
Wait and verify that the channel has been successfully opened.
|
void |
verify(long timeoutMillis)
Wait and verify that the channel has been successfully opened.
|
void |
verify(long timeout,
TimeUnit unit)
Wait and verify that the channel has been successfully opened.
|
addListener, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, isDone, removeListenervoid verify()
throws IOException
IOException - if the action failed for any reasonvoid verify(long timeout,
TimeUnit unit)
throws IOException
timeout - The number of time units to waitunit - The wait TimeUnitIOException - If failed to verify successfully on timevoid verify(long timeoutMillis)
throws IOException
timeoutMillis - Wait timeout in millisecondsIOException - If failed to verify successfully on timeThrowable getException()
null if the connect operation is not finished yet,
or if the connection attempt is successful.boolean isOpened()
true if the connect operation is finished successfully.boolean isCanceled()
true if the connect operation has been canceled by
cancel() method.void setOpened()
void setException(Throwable exception)
exception - The caught Throwablevoid cancel()
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.