直接上图:
(1)android-async-http-library:
Notes:
- 由线程池ExecutorService管理AsyncHttpRequest(extends Runnable)。
- 使用apache的 HttpClient 进行http连接。
- 策略模式
(2)Volley:
Notes:
- 由Thread[](NetworkDispatcher、CacheDispatcher)来调用Network函数并驱动 ResponseDeliveryRunnable(extends Runnable)。
- http连接方式:根据SDK版本自动选择HttpURLConnection(≥9, android 2.3)、HttpClient。