com.android.volley
Class Response<T>

java.lang.Object
  extended by com.android.volley.Response<T>
Type Parameters:
T - Parsed type of this response

public class Response<T>
extends Object

Encapsulates a parsed response for delivery.


Nested Class Summary
static interface Response.ErrorListener
          Callback interface for delivering error responses.
static interface Response.Listener<T>
          Callback interface for delivering parsed responses.
 
Field Summary
 Cache.Entry cacheEntry
          Cache metadata for this response, or null in the case of error.
 VolleyError error
          Detailed error information if errorCode != OK.
 boolean intermediate
          True if this response was a soft-expired one and a second one MAY be coming.
 T result
          Parsed response, or null in the case of error.
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

result

public final T result
Parsed response, or null in the case of error.


cacheEntry

public final Cache.Entry cacheEntry
Cache metadata for this response, or null in the case of error.


error

public final VolleyError error
Detailed error information if errorCode != OK.


intermediate

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

Method Detail

success

public static <T> Response<T> success(T result,
                                      Cache.Entry cacheEntry)
Returns a successful response containing the parsed result.


error

public 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.


isSuccess

public boolean isSuccess()
Returns whether this response is considered successful.