RequestTaskCompletionSource

public class RequestTaskCompletionSource<T> implements Response.Listener<T>, 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.

Parameters

<T>

The response type of the request.

Functions

getTask
Link copied to clipboard
Task<TgetTask()
Returns the task which will be completed by this completion source.
newCompletionSource
Link copied to clipboard
static RequestTaskCompletionSource<TnewCompletionSource<T>()
onErrorResponse
Link copied to clipboard
synchronized void onErrorResponse(VolleyError error)
onResponse
Link copied to clipboard
void onResponse(T response)