Package org.apache.sshd.common.io.nio2
Class Nio2Connector.DefaultIoConnectFuture
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.future.AbstractSshFuture<T>
org.apache.sshd.common.future.DefaultSshFuture<IoConnectFuture>
org.apache.sshd.common.io.nio2.Nio2Connector.DefaultIoConnectFuture
- All Implemented Interfaces:
SshFuture<IoConnectFuture>,WaitableFuture,IoConnectFuture
- Enclosing class:
- Nio2Connector
public static class Nio2Connector.DefaultIoConnectFuture
extends DefaultSshFuture<IoConnectFuture>
implements IoConnectFuture
-
Field Summary
Fields inherited from class org.apache.sshd.common.future.AbstractSshFuture
CANCELEDFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the cause of the connection failure.booleanvoidsetException(Throwable exception) Sets the exception caught due to connection failure and notifies all threads waiting for this future.voidsetSession(IoSession session) Sets the newly connected session and notifies all threads waiting for this future.Methods inherited from class org.apache.sshd.common.future.DefaultSshFuture
addListener, await0, cancel, getNumRegisteredListeners, getValue, isCanceled, isDone, notifyListeners, removeListener, setValue, toStringMethods inherited from class org.apache.sshd.common.future.AbstractSshFuture
asListener, asT, await, awaitUninterruptibly, formatExceptionMessage, getId, notifyListener, verifyResultMethods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.io.IoConnectFuture
cancel, isCanceledMethods inherited from interface org.apache.sshd.common.future.SshFuture
addListener, removeListenerMethods inherited from interface org.apache.sshd.common.future.WaitableFuture
await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDone
-
Constructor Details
-
DefaultIoConnectFuture
-
-
Method Details
-
getSession
- Specified by:
getSessionin interfaceIoConnectFuture- Returns:
- The current
IoSession- may benullif connect operation not finished yet or attempt has failed - See Also:
-
getException
Description copied from interface:IoConnectFutureReturns the cause of the connection failure.- Specified by:
getExceptionin interfaceIoConnectFuture- Returns:
nullif the connect operation is not finished yet, or if the connection attempt is successful.- See Also:
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceIoConnectFuture- Returns:
- true if the connect operation is finished successfully.
-
setSession
Description copied from interface:IoConnectFutureSets the newly connected session and notifies all threads waiting for this future. This method is invoked by SSHD internally. Please do not call this method directly.- Specified by:
setSessionin interfaceIoConnectFuture- Parameters:
session- The connectedIoSession
-
setException
Description copied from interface:IoConnectFutureSets the exception caught due to connection failure and notifies all threads waiting for this future. This method is invoked by SSHD internally. Please do not call this method directly.- Specified by:
setExceptionin interfaceIoConnectFuture- Parameters:
exception- The caughtThrowable
-