Class DefaultCancellableSshFuture<T extends SshFuture<T>>

    • Constructor Detail

      • DefaultCancellableSshFuture

        protected DefaultCancellableSshFuture​(java.lang.Object id,
                                              java.lang.Object lock)
    • Method Detail

      • isCanceled

        public boolean isCanceled()
        Description copied from interface: Cancellable
        Tells whether this operation was canceled.
        Specified by:
        isCanceled in interface Cancellable
        Returns:
        true if the operation was cancelled, false otherwise.
      • cancel

        public CancelFuture cancel()
        Description copied from interface: Cancellable
        Attempts to cancel the operation.
        Specified by:
        cancel in interface Cancellable
        Returns:
        A CancelFuture that can be used to wait for the cancellation to have been effected, or null if the future cannot be canceled or is already completed.
      • getException

        public java.lang.Throwable getException()
        Description copied from interface: HasException
        Returns the cause of the failure.
        Specified by:
        getException in interface HasException
        Returns:
        the Throwable of the failure, or null if not failed (yet).
      • setException

        public void setException​(java.lang.Throwable exception)
        Sets the exception that caused the operation to fail. If the exception cannot be set but the future is already canceled, the exception will be reported through this future's CancelFuture.
        Specified by:
        setException in interface WithException
        Parameters:
        exception - The Throwable to set; must be non-null