public static class Nio2Connector.DefaultIoConnectFuture extends DefaultSshFuture<IoConnectFuture> implements IoConnectFuture
CANCELED
log
Constructor and Description |
---|
DefaultIoConnectFuture(Object id,
Object lock) |
Modifier and Type | Method and Description |
---|---|
Throwable |
getException()
Returns the cause of the connection failure.
|
IoSession |
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(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
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
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 IoSession getSession()
getSession
in interface IoConnectFuture
IoSession
- may be null
if connect operation not finished yet or attempt has
failedIoConnectFuture.getException()
public 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(Throwable exception)
IoConnectFuture
setException
in interface IoConnectFuture
exception
- The caught Throwable
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.