Class DefaultOpenFuture

    • Constructor Detail

      • DefaultOpenFuture

        public DefaultOpenFuture​(java.lang.Object id,
                                 java.lang.Object lock)
    • Method Detail

      • verify

        public OpenFuture verify​(long timeoutMillis)
                          throws java.io.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
        Returns:
        The (same) future instance
        Throws:
        java.io.IOException - If failed to verify successfully on time
      • getException

        public java.lang.Throwable getException()
        Description copied from interface: OpenFuture
        Returns the cause of the connection failure.
        Specified by:
        getException in interface OpenFuture
        Returns:
        null if the connect operation is not finished yet, or if the connection attempt is successful (use WaitableFuture.isDone() to distinguish between the two).
      • 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
      • setException

        public void setException​(java.lang.Throwable exception)
        Description copied from interface: OpenFuture
        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 OpenFuture
        Parameters:
        exception - The caught Throwable