Class RequestTaskCompletionSource<T>

  • Type Parameters:
    T - The response type of the request.
    All Implemented Interfaces:
    com.android.volley.Response.ErrorListener, com.android.volley.Response.Listener<T>

    public class RequestTaskCompletionSource<T>
    extends java.lang.Object
    implements com.android.volley.Response.Listener<T>, com.android.volley.Response.ErrorListener
    Handy class to wrap Bolt's tasks around a volley request. Can be used as both the response listener and error listener of a volley request.
    • Method Detail

      • getTask

        public bolts.Task<T> getTask()
        Returns the task which will be completed by this completion source.
      • onResponse

        public void onResponse​(T response)
        Specified by:
        onResponse in interface com.android.volley.Response.Listener<T>
      • onErrorResponse

        public void onErrorResponse​(com.android.volley.VolleyError error)
        Specified by:
        onErrorResponse in interface com.android.volley.Response.ErrorListener