public class

Response

extends Object
java.lang.Object
   ↳ com.android.volley.Response<T>

Class Overview

Encapsulates a parsed response for delivery.

Summary

Nested Classes
interface Response.ErrorListener Callback interface for delivering error responses. 
interface Response.Listener<T> Callback interface for delivering parsed responses. 
Fields
public final Cache.Entry cacheEntry Cache metadata for this response, or null in the case of error.
public final VolleyError error Detailed error information if errorCode != OK.
public boolean intermediate True if this response was a soft-expired one and a second one MAY be coming.
public final T result Parsed response, or null in the case of error.
Public Methods
static <T> Response<T> error(VolleyError error)
Returns a failed response containing the given error code and an optional localized message displayed to the user.
boolean isSuccess()
Returns whether this response is considered successful.
static <T> Response<T> success(T result, Cache.Entry cacheEntry)
Returns a successful response containing the parsed result.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public final Cache.Entry cacheEntry

Cache metadata for this response, or null in the case of error.

public final VolleyError error

Detailed error information if errorCode != OK.

public boolean intermediate

True if this response was a soft-expired one and a second one MAY be coming.

public final T result

Parsed response, or null in the case of error.

Public Methods

public static Response<T> error (VolleyError error)

Returns a failed response containing the given error code and an optional localized message displayed to the user.

public boolean isSuccess ()

Returns whether this response is considered successful.

public static Response<T> success (T result, Cache.Entry cacheEntry)

Returns a successful response containing the parsed result.