Skip to content

Commit

Permalink
Release 1.0.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
yanzhenjie committed Sep 4, 2016
1 parent f56c020 commit 0b6f49d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions nohttp/src/main/java/com/yolanda/nohttp/NoHttp.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.yolanda.nohttp.download.Downloader;
import com.yolanda.nohttp.download.RestDownloadRequest;
import com.yolanda.nohttp.rest.IParserRequest;
import com.yolanda.nohttp.rest.IRestConnection;
import com.yolanda.nohttp.rest.IRestParser;
import com.yolanda.nohttp.rest.IRestProtocol;
import com.yolanda.nohttp.rest.ImageRequest;
Expand Down Expand Up @@ -105,7 +106,7 @@ public class NoHttp {
*
* @return Returns the request queue, the queue is used to control the entry of the request.
* @see #newRequestQueue(int)
* @see #newRequestQueue(Cache, int)
* @see #newRequestQueue(Cache, IRestConnection, int)
* @see #newRequestQueue(IRestProtocol, int)
* @see #newRequestQueue(IRestParser, int)
*/
Expand All @@ -119,27 +120,28 @@ public static RequestQueue newRequestQueue() {
* @param threadPoolSize request the number of concurrent.
* @return Returns the request queue, the queue is used to control the entry of the request.
* @see #newRequestQueue()
* @see #newRequestQueue(Cache, int)
* @see #newRequestQueue(Cache, IRestConnection, int)
* @see #newRequestQueue(IRestProtocol, int)
* @see #newRequestQueue(IRestParser, int)
*/
public static RequestQueue newRequestQueue(int threadPoolSize) {
return newRequestQueue(DiskCacheStore.INSTANCE, threadPoolSize);
return newRequestQueue(DiskCacheStore.INSTANCE, RestConnection.getInstance(), threadPoolSize);
}

/**
* Create a new request queue, using NoHttp default request connection {@link RestProtocol} and default response parser {@link RestParser}.
*
* @param cache cache interface, which is used to cache the request results.
* @param threadPoolSize request the number of concurrent.
* @param cache cache interface, which is used to cache the request results.
* @param iRestConnection The realization of the network layer.
* @param threadPoolSize request the number of concurrent.
* @return Returns the request queue, the queue is used to control the entry of the request.
* @see #newRequestQueue()
* @see #newRequestQueue(int)
* @see #newRequestQueue(IRestProtocol, int)
* @see #newRequestQueue(IRestParser, int)
*/
public static RequestQueue newRequestQueue(Cache<CacheEntity> cache, int threadPoolSize) {
return newRequestQueue(RestProtocol.getInstance(cache, RestConnection.getInstance()), threadPoolSize);
public static RequestQueue newRequestQueue(Cache<CacheEntity> cache, IRestConnection iRestConnection, int threadPoolSize) {
return newRequestQueue(RestProtocol.getInstance(cache, iRestConnection), threadPoolSize);
}

/**
Expand All @@ -150,7 +152,7 @@ public static RequestQueue newRequestQueue(Cache<CacheEntity> cache, int threadP
* @return Returns the request queue, the queue is used to control the entry of the request.
* @see #newRequestQueue()
* @see #newRequestQueue(int)
* @see #newRequestQueue(Cache, int)
* @see #newRequestQueue(Cache, IRestConnection, int)
* @see #newRequestQueue(IRestParser, int)
*/
public static RequestQueue newRequestQueue(IRestProtocol iRestProtocol, int threadPoolSize) {
Expand All @@ -165,7 +167,7 @@ public static RequestQueue newRequestQueue(IRestProtocol iRestProtocol, int thre
* @return Returns the request queue, the queue is used to control the entry of the request.
* @see #newRequestQueue()
* @see #newRequestQueue(int)
* @see #newRequestQueue(Cache, int)
* @see #newRequestQueue(Cache, IRestConnection, int)
* @see #newRequestQueue(IRestProtocol, int)
*/
public static RequestQueue newRequestQueue(IRestParser implRestParser, int threadPoolSize) {
Expand Down

0 comments on commit 0b6f49d

Please sign in to comment.