Responsepublic class Response extends Object Encapsulates a parsed response for delivery. |
Fields Summary |
---|
public final T | resultParsed response, or null in the case of error. | public final Cache.Entry | cacheEntryCache metadata for this response, or null in the case of error. | public final VolleyError | errorDetailed error information if errorCode != OK . | public boolean | intermediateTrue if this response was a soft-expired one and a second one MAY be coming. |
Constructors Summary |
---|
private Response(T result, Cache.Entry cacheEntry)
this.result = result;
this.cacheEntry = cacheEntry;
this.error = null;
| private Response(VolleyError error)
this.result = null;
this.cacheEntry = null;
this.error = error;
|
Methods Summary |
---|
public static com.android.volley.Response | error(VolleyError error)Returns a failed response containing the given error code and an optional
localized message displayed to the user.
return new Response<T>(error);
| public boolean | isSuccess()Returns whether this response is considered successful.
return error == null;
| public static com.android.volley.Response | success(T result, Cache.Entry cacheEntry)Returns a successful response containing the parsed result.
return new Response<T>(result, cacheEntry);
|
|