RequestTracker

open class RequestTracker

A class for tracking, canceling, and restarting in progress, completed, and failed requests.

This class is not thread safe and must be accessed on the main thread.

Functions

Link copied to clipboard
open fun clearAndRemove(request: Request): Boolean
Stops tracking the given request, clears, and recycles it, and returns true if the request was removed or invalid or false if the request was not found.
Link copied to clipboard
open fun clearRequests()
Cancels all requests and clears their resources.
Link copied to clipboard
open fun pauseAllRequests()
Stops any in progress requests and releases bitmaps associated with completed requests.
Link copied to clipboard
open fun pauseRequests()
Stops any in progress requests.
Link copied to clipboard
open fun restartRequests()
Restarts failed requests and cancels and restarts in progress requests.
Link copied to clipboard
open fun resumeRequests()
Starts any not yet completed or failed requests.
Link copied to clipboard
open fun runRequest(request: Request)
Starts tracking the given request.
Link copied to clipboard
open fun toString(): String

Properties

Link copied to clipboard
open val isPaused: Boolean