Class Nio2Connector.DefaultIoConnectFuture

All Implemented Interfaces:
SshFuture<IoConnectFuture>, WaitableFuture, IoConnectFuture
Enclosing class:
Nio2Connector

public static class Nio2Connector.DefaultIoConnectFuture extends DefaultSshFuture<IoConnectFuture> implements IoConnectFuture
  • Constructor Details

    • DefaultIoConnectFuture

      public DefaultIoConnectFuture(Object id, Object lock)
  • Method Details

    • getSession

      public IoSession getSession()
      Specified by:
      getSession in interface IoConnectFuture
      Returns:
      The current IoSession - may be null if connect operation not finished yet or attempt has failed
      See Also:
    • getException

      public Throwable getException()
      Description copied from interface: IoConnectFuture
      Returns the cause of the connection failure.
      Specified by:
      getException in interface IoConnectFuture
      Returns:
      null if the connect operation is not finished yet, or if the connection attempt is successful.
      See Also:
    • isConnected

      public boolean isConnected()
      Specified by:
      isConnected in interface IoConnectFuture
      Returns:
      true if the connect operation is finished successfully.
    • setSession

      public void setSession(IoSession session)
      Description copied from interface: IoConnectFuture
      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.
      Specified by:
      setSession in interface IoConnectFuture
      Parameters:
      session - The connected IoSession
    • setException

      public void setException(Throwable exception)
      Description copied from interface: IoConnectFuture
      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.
      Specified by:
      setException in interface IoConnectFuture
      Parameters:
      exception - The caught Throwable