当前位置: 首页>>代码示例>>Java>>正文


Java ExecutorDelivery类代码示例

本文整理汇总了Java中com.android.volley.ExecutorDelivery的典型用法代码示例。如果您正苦于以下问题:Java ExecutorDelivery类的具体用法?Java ExecutorDelivery怎么用?Java ExecutorDelivery使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ExecutorDelivery类属于com.android.volley包,在下文中一共展示了ExecutorDelivery类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: newVolleyRequestQueueForTest

import com.android.volley.ExecutorDelivery; //导入依赖的package包/类
private RequestQueue newVolleyRequestQueueForTest(final Context context) {
    File cacheDir = new File(context.getCacheDir(), "cache/volley");
    Network network = new BasicNetwork(new HurlStack());
    ResponseDelivery responseDelivery = new ExecutorDelivery(Executors.newSingleThreadExecutor());
    RequestQueue queue = new RequestQueue(new DiskBasedCache(cacheDir), network, 4, responseDelivery);
    queue.start();

    return queue;
}
 
开发者ID:Q115,项目名称:Goalie_Android,代码行数:10,代码来源:BaseTest.java

示例2: newRequestQueue

import com.android.volley.ExecutorDelivery; //导入依赖的package包/类
/**
 * 自定义Volley请求Queue
 *
 * @param context Context
 * @return RequestQueue
 */
public RequestQueue newRequestQueue(Context context) {
    File cacheDir = new File(context.getCacheDir(), DEFAULT_CACHE_DIR);
    Network network = new BasicNetwork(new HurlStack());
    RequestQueue queue = new RequestQueue(new DiskBasedCache(cacheDir),
            network,
            DEFAULT_NETWORK_THREAD_POOL_SIZE,
            new ExecutorDelivery(executorService));
    queue.start();
    return queue;
}
 
开发者ID:xmagicj,项目名称:HappyVolley,代码行数:17,代码来源:HappyRequestQueue.java

示例3: WaspTest

import com.android.volley.ExecutorDelivery; //导入依赖的package包/类
public WaspTest() throws Exception {
  File cacheDir = new File(context.getCacheDir(), "volley");
  Network network = new BasicNetwork(new OkHttpStack(new OkHttpClient()));
  ResponseDelivery delivery = new ExecutorDelivery(executor);
  requestQueue = new RequestQueue(new DiskBasedCache(cacheDir), network, 4, delivery);
  requestQueue.start();

  server.start();
}
 
开发者ID:orhanobut,项目名称:wasp,代码行数:10,代码来源:WaspTest.java

示例4: SmartRequestQueue

import com.android.volley.ExecutorDelivery; //导入依赖的package包/类
/**
 * Creates the worker pool. Processing will not begin until {@link #start()} is called.
 *
 * @param cache A Cache to use for persisting responses to disk
 * @param network A Network interface for performing HTTP requests
 * @param threadPoolSize Number of network dispatcher threads to create
 */
public SmartRequestQueue(Cache cache, Network network, int threadPoolSize) {
    this(cache, network, threadPoolSize,
            new ExecutorDelivery(new Handler(Looper.getMainLooper())));
}
 
开发者ID:Vrael,项目名称:eManga,代码行数:12,代码来源:SmartRequestQueue.java


注:本文中的com.android.volley.ExecutorDelivery类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。