com.android.volley.toolbox
Class ClearCacheRequest

java.lang.Object
  extended by com.android.volley.Request<Object>
      extended by com.android.volley.toolbox.ClearCacheRequest
All Implemented Interfaces:
Comparable<Request<Object>>

public class ClearCacheRequest
extends Request<Object>

A synthetic request used for clearing the cache.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.android.volley.Request
Request.Method, Request.Priority
 
Constructor Summary
ClearCacheRequest(Cache cache, Runnable callback)
          Creates a synthetic request for clearing the cache.
 
Method Summary
protected  void deliverResponse(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<Object> parseNetworkResponse(NetworkResponse response)
          Subclasses must implement this to parse the raw network response and return an appropriate response type.
 
Methods inherited from class com.android.volley.Request
addMarker, cancel, compareTo, deliverError, getBody, getBodyContentType, getCacheEntry, getCacheKey, getHeaders, getMethod, getParams, getParamsEncoding, getPostBody, getPostBodyContentType, getPostParams, getPostParamsEncoding, getRetryPolicy, getSequence, getTag, getTimeoutMs, getTrafficStatsTag, getUrl, hasHadResponseDelivered, markDelivered, parseNetworkError, setCacheEntry, setRequestQueue, setRetryPolicy, setSequence, setShouldCache, setTag, shouldCache, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClearCacheRequest

public ClearCacheRequest(Cache cache,
                         Runnable callback)
Creates a synthetic request for clearing the cache.

Parameters:
cache - Cache to clear
callback - Callback to make on the main thread once the cache is clear, or null for none
Method Detail

isCanceled

public boolean isCanceled()
Description copied from class: Request
Returns true if this request has been canceled.

Overrides:
isCanceled in class Request<Object>

getPriority

public Request.Priority getPriority()
Description copied from class: Request
Returns the Request.Priority of this request; Request.Priority.NORMAL by default.

Overrides:
getPriority in class Request<Object>

parseNetworkResponse

protected Response<Object> parseNetworkResponse(NetworkResponse response)
Description copied from class: Request
Subclasses must implement this to parse the raw network response and return an appropriate response type. This method will be called from a worker thread. The response will not be delivered if you return null.

Specified by:
parseNetworkResponse in class Request<Object>
Parameters:
response - Response from the network
Returns:
The parsed response, or null in the case of an error

deliverResponse

protected void deliverResponse(Object response)
Description copied from class: Request
Subclasses must implement this to perform delivery of the parsed response to their listeners. The given response is guaranteed to be non-null; responses that fail to parse are not delivered.

Specified by:
deliverResponse in class Request<Object>
Parameters:
response - The parsed response returned by Request.parseNetworkResponse(NetworkResponse)