Class DefaultOpenFuture

All Implemented Interfaces:
OpenFuture, Cancellable, HasException, SshFuture<OpenFuture>, VerifiableFuture<OpenFuture>, WaitableFuture, WithException

public class DefaultOpenFuture extends DefaultCancellableSshFuture<OpenFuture> implements OpenFuture
A default implementation of OpenFuture.
  • Constructor Details

    • DefaultOpenFuture

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

    • verify

      public OpenFuture verify(long timeoutMillis, CancelOption... options) throws IOException
      Description copied from interface: VerifiableFuture
      Wait and verify that the operation was successful
      Specified by:
      verify in interface VerifiableFuture<OpenFuture>
      Parameters:
      timeoutMillis - Wait timeout in milliseconds
      options - Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
      Returns:
      The (same) future instance
      Throws:
      IOException - If failed to verify successfully on time
    • isOpened

      public boolean isOpened()
      Specified by:
      isOpened in interface OpenFuture
      Returns:
      true if the connect operation is finished successfully.
    • setOpened

      public void setOpened()
      Description copied from interface: OpenFuture
      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:
      setOpened in interface OpenFuture