public interface Request
An API request.
Instances of this class encapsulates a sequence of normally one (nominal case), potentially many (in case of retry) network calls into a high-level operation. This operation can be cancelled by the user.
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel this request.
|
boolean |
isCancelled()
Test if this request has been cancelled.
|
boolean |
isFinished()
Test if this request is still running.
|
void cancel()
Cancel this request. The listener will not be called after a request has been cancelled.
WARNING: Cancelling a request may or may not cancel the underlying network call, depending how late the cancellation happens. In other words, a cancelled request may have already been executed by the server. In any case, cancelling never carries “undo” semantics.
boolean isFinished()
Test if this request is still running.
boolean isCancelled()
Test if this request has been cancelled.