类 Response<T>

java.lang.Object
com.android.volley.Response<T>
类型参数:
T - Parsed type of this response

public class Response<T> extends Object
Encapsulates a parsed response for delivery.
  • 嵌套类概要

    嵌套类
    修饰符和类型
    说明
    static interface 
    Callback interface for delivering error responses.
    static interface 
    Callback interface for delivering parsed responses.
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    Cache metadata for this response, or null in the case of error.
    Detailed error information if errorCode !
    boolean
    True if this response was a soft-expired one and a second one MAY be coming.
    final T
    Parsed response, or null in the case of error.
  • 方法概要

    修饰符和类型
    方法
    说明
    static <T> Response<T>
    Returns a failed response containing the given error code and an optional localized message displayed to the user.
    boolean
    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.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • 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.
  • 方法详细资料

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