public static class Nio2Connector.DefaultIoConnectFuture extends DefaultSshFuture<IoConnectFuture> implements IoConnectFuture
CANCELED, debugEnabled, traceEnabled
log
Constructor and Description |
---|
DefaultIoConnectFuture(java.lang.Object id,
java.lang.Object lock) |
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getException()
Returns the cause of the connection failure.
|
IoSession |
getSession() |
boolean |
isConnected() |
void |
setException(java.lang.Throwable exception)
Sets the exception caught due to connection failure and notifies all threads waiting for this future.
|
void |
setSession(IoSession session)
Sets the newly connected session and notifies all threads waiting for this future.
|
addListener, await0, cancel, getNumRegisteredListeners, getValue, isCanceled, isDone, notifyListeners, removeListener, setValue, toString
asListener, asT, await, awaitUninterruptibly, formatExceptionMessage, getId, notifyListener, verifyResult
getSimplifiedLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
cancel, isCanceled
addListener, removeListener
await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDone
public DefaultIoConnectFuture(java.lang.Object id, java.lang.Object lock)
public IoSession getSession()
getSession
in interface IoConnectFuture
IoSession
- may be null
if connect operation not finished yet or attempt has
failedIoConnectFuture.getException()
public java.lang.Throwable getException()
IoConnectFuture
getException
in interface IoConnectFuture
null
if the connect operation is not finished yet, or if the connection attempt is successful.IoConnectFuture.getSession()
public boolean isConnected()
isConnected
in interface IoConnectFuture
public void setSession(IoSession session)
IoConnectFuture
setSession
in interface IoConnectFuture
session
- The connected IoSession
public void setException(java.lang.Throwable exception)
IoConnectFuture
setException
in interface IoConnectFuture
exception
- The caught Throwable