FileDocCategorySizeDatePackage
Response.javaAPI DocAndroid 5.1 API2649Thu Mar 12 22:22:56 GMT 2015com.android.volley

Response

public class Response extends Object
Encapsulates a parsed response for delivery.
param
Parsed type of this response

Fields Summary
public final T
result
Parsed response, or null in the case of error.
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.
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.Responseerror(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 booleanisSuccess()
Returns whether this response is considered successful.


                
       
        return error == null;
    
public static com.android.volley.Responsesuccess(T result, Cache.Entry cacheEntry)
Returns a successful response containing the parsed result.

        return new Response<T>(result, cacheEntry);