public class

ClearCacheRequest

extends Request<T>
java.lang.Object
   ↳ com.android.volley.Request<T>
     ↳ com.android.volley.toolbox.ClearCacheRequest

Class Overview

A synthetic request used for clearing the cache.

Summary

Public Constructors
ClearCacheRequest(Cache cache, Runnable callback)
Creates a synthetic request for clearing the cache.
Public Methods
Request.Priority getPriority()
Returns the Request.Priority of this request; NORMAL by default.
boolean isCanceled()
Returns true if this request has been canceled.
Protected Methods
void deliverResponse(Object response)
Subclasses must implement this to perform delivery of the parsed response to their listeners.
Response<Object> parseNetworkResponse(NetworkResponse response)
Subclasses must implement this to parse the raw network response and return an appropriate response type.
[Expand]
Inherited Methods
From class com.android.volley.Request
From class java.lang.Object
From interface java.lang.Comparable

Public Constructors

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

Public Methods

public Request.Priority getPriority ()

Returns the Request.Priority of this request; NORMAL by default.

public boolean isCanceled ()

Returns true if this request has been canceled.

Protected Methods

protected void deliverResponse (Object response)

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.

Parameters
response The parsed response returned by parseNetworkResponse(NetworkResponse)

protected Response<Object> parseNetworkResponse (NetworkResponse response)

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.

Parameters
response Response from the network
Returns
  • The parsed response, or null in the case of an error