Package org.apache.sshd.common.io
Interface IoConnectFuture
-
- All Superinterfaces:
SshFuture<IoConnectFuture>,WaitableFuture
public interface IoConnectFuture extends SshFuture<IoConnectFuture>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancel()Cancels the connection attempt and notifies all threads waiting for this future.ThrowablegetException()Returns the cause of the connection failure.IoSessiongetSession()booleanisCanceled()booleanisConnected()voidsetException(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 interface org.apache.sshd.common.future.SshFuture
addListener, removeListener
-
Methods inherited from interface org.apache.sshd.common.future.WaitableFuture
await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDone
-
-
-
-
Method Detail
-
getSession
IoSession getSession()
- Returns:
- The current
IoSession- may benullif connect operation not finished yet or attempt has failed - See Also:
getException()
-
getException
Throwable getException()
Returns the cause of the connection failure.- Returns:
nullif the connect operation is not finished yet, or if the connection attempt is successful.- See Also:
getSession()
-
isConnected
boolean isConnected()
- Returns:
- true if the connect operation is finished successfully.
-
isCanceled
boolean isCanceled()
- Returns:
trueif the connect operation has been canceled bycancel()method.
-
setSession
void setSession(IoSession session)
Sets 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.- Parameters:
session- The connectedIoSession
-
setException
void setException(Throwable exception)
Sets 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.- Parameters:
exception- The caughtThrowable
-
cancel
void cancel()
Cancels the connection attempt and notifies all threads waiting for this future.
-
-