I'm programming an application which communicates a http server.
I have both synchronized and asynchronized requests. I have a singleton which contains Volley RequestQueue for asynchronous requests. Now I want to implement a queue of synchronous requests like:
Request i -> ... -> Response i -> Request i+1 -> ... -> Response i+1
but not:
Request i -> Request i+1 -> ... -> Response i -> Response i+1
I have read this topic: Can I do a synchronous request with volley?
I want to inject different Listener and ErrorListener (depends on request type). So I added new objects of Listener and ErrorListener as variables in RequestFuture class.
public class RequestFuture<T> implements Future<T>, Response.Listener<T>, Response.ErrorListener {
...
Response.Listener mListener;
Response.ErrorListener mErrorListener;
...
}
But what I truly want to do is a queue of async requests. How can I do it with Volley?
I wonder whether I continue with Volley or HTTPRequestExecutor(has been deprecated)?
Any feedback is much appreciated, thanks.