Package org.apache.sshd.common.future
Interface Cancellable
-
- All Superinterfaces:
WithException
- All Known Subinterfaces:
IoConnectFuture
- All Known Implementing Classes:
DefaultCancellableSshFuture,DefaultIoConnectFuture
public interface Cancellable extends WithException
Some operation that can be cancelled.Classes implementing this interface that support state listeners are expected to notify the listeners when
cancel()changes the state of the operation.- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CancelFuturecancel()Attempts to cancel the operation.CancelFuturegetCancellation()Retrieves theCancelFuture, ifcancel()had been called.booleanisCanceled()Tells whether this operation was canceled.-
Methods inherited from interface org.apache.sshd.common.future.WithException
getException, setException
-
-
-
-
Method Detail
-
cancel
CancelFuture cancel()
Attempts to cancel the operation.- Returns:
- A
CancelFuturethat can be used to wait for the cancellation to have been effected, ornullif the future cannot be canceled or is already completed.
-
isCanceled
boolean isCanceled()
Tells whether this operation was canceled.- Returns:
trueif the operation was cancelled,falseotherwise.
-
getCancellation
CancelFuture getCancellation()
Retrieves theCancelFuture, ifcancel()had been called.- Returns:
- The
CancelFutureif theCancellablehas already been canceled, ornullotherwise
-
-