Request.Method, Request.Priority
Constructor and Description |
---|
ClearCacheRequest(Cache cache,
java.lang.Runnable callback)
Creates a synthetic request for clearing the cache.
|
Modifier and Type | Method and Description |
---|---|
protected void |
deliverResponse(java.lang.Object response)
Subclasses must implement this to perform delivery of the parsed
response to their listeners.
|
Request.Priority |
getPriority()
Returns the
Request.Priority of this request; Request.Priority.NORMAL by default. |
boolean |
isCanceled()
Returns true if this request has been canceled.
|
protected Response<java.lang.Object> |
parseNetworkResponse(NetworkResponse response)
Subclasses must implement this to parse the raw network response
and return an appropriate response type.
|
addMarker, cancel, compareTo, deliverError, getBody, getBodyContentType, getCacheEntry, getCacheKey, getErrorListener, getHeaders, getMethod, getParams, getParamsEncoding, getPostBody, getPostBodyContentType, getPostParams, getPostParamsEncoding, getRetryPolicy, getSequence, getTag, getTimeoutMs, getTrafficStatsTag, getUrl, hasHadResponseDelivered, markDelivered, parseNetworkError, setCacheEntry, setRequestQueue, setRetryPolicy, setSequence, setShouldCache, setShouldRetryServerErrors, setTag, shouldCache, shouldRetryServerErrors, toString
public ClearCacheRequest(Cache cache, java.lang.Runnable callback)
cache
- Cache to clearcallback
- Callback to make on the main thread once the cache is clear,
or null for nonepublic boolean isCanceled()
Request
isCanceled
in class Request<java.lang.Object>
public Request.Priority getPriority()
Request
Request.Priority
of this request; Request.Priority.NORMAL
by default.getPriority
in class Request<java.lang.Object>
protected Response<java.lang.Object> parseNetworkResponse(NetworkResponse response)
Request
parseNetworkResponse
in class Request<java.lang.Object>
response
- Response from the networkprotected void deliverResponse(java.lang.Object response)
Request
deliverResponse
in class Request<java.lang.Object>
response
- The parsed response returned by
Request.parseNetworkResponse(NetworkResponse)