public class ExecutorDelivery extends java.lang.Object implements ResponseDelivery
Constructor and Description |
---|
ExecutorDelivery(java.util.concurrent.Executor executor)
Creates a new response delivery interface, mockable version
for testing.
|
ExecutorDelivery(android.os.Handler handler)
Creates a new response delivery interface.
|
Modifier and Type | Method and Description |
---|---|
void |
postError(Request<?> request,
VolleyError error)
Posts an error for the given request.
|
void |
postResponse(Request<?> request,
Response<?> response)
Parses a response from the network or cache and delivers it.
|
void |
postResponse(Request<?> request,
Response<?> response,
java.lang.Runnable runnable)
Parses a response from the network or cache and delivers it.
|
public ExecutorDelivery(android.os.Handler handler)
handler
- Handler
to post responses onpublic ExecutorDelivery(java.util.concurrent.Executor executor)
executor
- For running delivery taskspublic void postResponse(Request<?> request, Response<?> response)
ResponseDelivery
postResponse
in interface ResponseDelivery
public void postResponse(Request<?> request, Response<?> response, java.lang.Runnable runnable)
ResponseDelivery
postResponse
in interface ResponseDelivery
public void postError(Request<?> request, VolleyError error)
ResponseDelivery
postError
in interface ResponseDelivery