Top Description Methods
org.apache.sshd.common.future

public Interface Cancellable

extends WithException
Known Direct Subinterfaces
org.apache.sshd.common.io.IoConnectFuture
Known Direct Implementers
org.apache.sshd.common.future.DefaultCancellableSshFuture

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

Modifier and TypeMethod and Description
public CancelFuture

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.
cancel
()

Attempts to cancel the operation.

public CancelFuture

Returns:

The CancelFuture if the Cancellable has already been canceled, or null otherwise
getCancellation
()

Retrieves the CancelFuture, if cancel() had been called.

public boolean

Returns:

true if the operation was cancelled, false otherwise.
isCanceled
()

Tells whether this operation was canceled.

Inherited from org.apache.sshd.common.future.WithException:
setException

Method Detail

cancelback to summary
public CancelFuture cancel()

Attempts to cancel the operation.

Returns:CancelFuture

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.

getCancellationback to summary
public CancelFuture getCancellation()

Retrieves the CancelFuture, if cancel() had been called.

Returns:CancelFuture

The CancelFuture if the Cancellable has already been canceled, or null otherwise

isCanceledback to summary
public boolean isCanceled()

Tells whether this operation was canceled.

Returns:boolean

true if the operation was cancelled, false otherwise.