public class DefaultOpenFuture extends DefaultVerifiableSshFuture<OpenFuture> implements OpenFuture
OpenFuture
.CANCELED
log
Constructor and Description |
---|
DefaultOpenFuture(Object lock) |
Modifier and Type | Method and Description |
---|---|
Throwable |
getException()
Returns the cause of the connection failure.
|
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.
|
OpenFuture |
verify(long timeoutMillis)
Wait and verify that the operation was successful
|
verify, verify
addListener, await0, cancel, getValue, isCanceled, isDone, notifyListeners, removeListener, setValue
asListener, asT, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, notifyListener, verifyResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cancel, isCanceled
addListener, removeListener
await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, isDone
verify, verify
public DefaultOpenFuture(Object lock)
public OpenFuture verify(long timeoutMillis) throws IOException
VerifiableFuture
verify
in interface VerifiableFuture<OpenFuture>
timeoutMillis
- Wait timeout in millisecondsIOException
- If failed to verify successfully on timepublic Throwable getException()
OpenFuture
getException
in interface OpenFuture
null
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 isOpened()
isOpened
in interface OpenFuture
true
if the connect operation is finished successfully.public void setOpened()
OpenFuture
setOpened
in interface OpenFuture
public void setException(Throwable exception)
OpenFuture
setException
in interface OpenFuture
exception
- The caught Throwable
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.