java.lang.Object | |
↳ | com.android.volley.Response<T> |
Encapsulates a parsed response for delivery.
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
|
True if this response was a soft-expired one and a second one MAY be coming.
Parsed response, or null in the case of error.
Returns a failed response containing the given error code and an optional localized message displayed to the user.
Returns whether this response is considered successful.
Returns a successful response containing the parsed result.