public class CancelToken
extends java.lang.Object
A token for requesting the cancellation of asynchronous requests.
| Constructor and Description |
|---|
CancelToken() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(CancellationListener listener)
Add a listener that will be notified if this token is cancelled.
|
void |
cancel()
Cancel all asynchronous requests using this token.
|
boolean |
isCancelled()
Return has cancellation been requested?
|
public void addListener(CancellationListener listener)
Add a listener that will be notified if this token is cancelled.
listener - Cancellation listener.public void cancel()
Cancel all asynchronous requests using this token.
public boolean isCancelled()
Return has cancellation been requested?