T - Type of futurepublic abstract class DefaultCancellableSshFuture<T extends SshFuture<T>> extends DefaultVerifiableSshFuture<T> implements Cancellable
Cancellable future implementation.log| Modifier | Constructor and Description |
|---|---|
protected |
DefaultCancellableSshFuture(Object id,
Object lock) |
| Modifier and Type | Method and Description |
|---|---|
CancelFuture |
cancel()
Attempts to cancel the operation.
|
protected CancelFuture |
createCancellation()
Creates a
CancelFuture if this future can be canceled. |
CancelFuture |
getCancellation()
Retrieves the
CancelFuture, if Cancellable.cancel() had been called. |
Throwable |
getException()
Returns the cause of the failure.
|
boolean |
isCanceled()
Tells whether this operation was canceled.
|
void |
setException(Throwable exception)
Sets the exception that caused the operation to fail.
|
addListener, await0, getNumRegisteredListeners, getValue, isDone, notifyListeners, onValueSet, removeListener, setValue, toStringasListener, asT, await, awaitUninterruptibly, formatExceptionMessage, getId, notifyListener, verifyResultdebug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitverify, verify, verify, verify, verify, verify, verify, verifyawait, await, await, await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptiblypublic boolean isCanceled()
CancellableisCanceled in interface Cancellabletrue if the operation was cancelled, false otherwise.protected CancelFuture createCancellation()
DefaultSshFutureCancelFuture if this future can be canceled.
This doesn't cancel this future yet.
createCancellation in class DefaultSshFuture<T extends SshFuture<T>>CancelFuture that can be used to wait for the cancellation to have been effected, or
null if the future cannot be canceled.public CancelFuture cancel()
Cancellablecancel in interface CancellableCancelFuture 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.public CancelFuture getCancellation()
CancellableCancelFuture, if Cancellable.cancel() had been called.getCancellation in interface CancellableCancelFuture if the Cancellable has already been canceled, or null otherwisepublic Throwable getException()
HasExceptiongetException in interface HasExceptionThrowable of the failure, or null if not failed (yet).public void setException(Throwable exception)
exception cannot be set but the future is already canceled, the exception will be reported through
this future's CancelFuture.setException in interface WithExceptionexception - The Throwable to set; must be non-nullCopyright © 2018–2024 The Apache Software Foundation. All rights reserved.