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


Java Request.addMarker方法代码示例

本文整理汇总了Java中com.android.volley.Request.addMarker方法的典型用法代码示例。如果您正苦于以下问题:Java Request.addMarker方法的具体用法?Java Request.addMarker怎么用?Java Request.addMarker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.android.volley.Request的用法示例。


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

示例1: attemptRetryOnException

import com.android.volley.Request; //导入方法依赖的package包/类
/**
 * Attempts to prepare the request for a retry. If there are no more attempts remaining in the
 * request's retry policy, a timeout exception is thrown.
 * @param request The request to use.
 */
private static void attemptRetryOnException(String logPrefix, Request<?> request,
        VolleyError exception) throws VolleyError {
    RetryPolicy retryPolicy = request.getRetryPolicy();
    int oldTimeout = request.getTimeoutMs();

    try {
        retryPolicy.retry(exception);
    } catch (VolleyError e) {
        request.addMarker(
                String.format("%s-timeout-giveup [timeout=%s]", logPrefix, oldTimeout));
        throw e;
    }
    request.addMarker(String.format("%s-retry [timeout=%s]", logPrefix, oldTimeout));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:20,代码来源:BasicNetwork.java

示例2: attemptRetryOnException

import com.android.volley.Request; //导入方法依赖的package包/类
private static void attemptRetryOnException(String logPrefix, Request<?> request, VolleyError exception) throws VolleyError {
    RetryPolicy retryPolicy = request.getRetryPolicy();
    int oldTimeout = request.getTimeoutMs();

    try {
        retryPolicy.retry(exception);
    } catch (VolleyError var6) {
        request.addMarker(String.format("%s-timeout-giveup [timeout=%s]", logPrefix, oldTimeout));
        throw var6;
    }

    request.addMarker(String.format("%s-retry [timeout=%s]", logPrefix, oldTimeout));
}
 
开发者ID:octaware,项目名称:super-volley,代码行数:14,代码来源:BasicNetwork.java

示例3: attemptRetryOnException

import com.android.volley.Request; //导入方法依赖的package包/类
/**
 * Attempts to prepare the request for a retry. If there are no more attempts remaining in the
 * request's retry policy, a timeout exception is thrown.
 *
 * @param request The request to use.
 */
private static void attemptRetryOnException(String logPrefix, Request<?> request, VolleyError exception)
        throws VolleyError {
    RetryPolicy retryPolicy = request.getRetryPolicy();
    int oldTimeout = request.getTimeoutMs();

    try {
        retryPolicy.retry(exception);
    } catch (VolleyError e) {
        request.addMarker(String.format("%s-timeout-giveup [timeout=%s]", logPrefix, oldTimeout));
        throw e;
    }
    request.addMarker(String.format("%s-retry [timeout=%s]", logPrefix, oldTimeout));
}
 
开发者ID:HanyeeWang,项目名称:GeekZone,代码行数:20,代码来源:BaseNetwork.java

示例4: attemptRetryOnException

import com.android.volley.Request; //导入方法依赖的package包/类
private static void attemptRetryOnException(String logPrefix, Request<?> request, VolleyError exception) throws VolleyError {
    RetryPolicy retryPolicy = request.getRetryPolicy();
    int oldTimeout = request.getTimeoutMs();
    try {
        retryPolicy.retry(exception);
        request.addMarker(String.format("%s-retry [timeout=%s]", new Object[]{logPrefix, Integer.valueOf(oldTimeout)}));
    } catch (VolleyError e) {
        request.addMarker(String.format("%s-timeout-giveup [timeout=%s]", new Object[]{logPrefix, Integer.valueOf(oldTimeout)}));
        throw e;
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:12,代码来源:BasicNetwork.java

示例5: attemptRetryOnException

import com.android.volley.Request; //导入方法依赖的package包/类
/**
 * Attempts to prepare the request for a retry. If there are no more attempts remaining in the
 * request's retry policy, a timeout exception is thrown.
 * @param request The request to use.
 */
private static void attemptRetryOnException(String logPrefix, Request<?> request,
                                            VolleyError exception) throws VolleyError {
  RetryPolicy retryPolicy = request.getRetryPolicy();
  int oldTimeout = request.getTimeoutMs();

  try {
    retryPolicy.retry(exception);
  } catch (VolleyError e) {
    request.addMarker(
        String.format("%s-timeout-giveup [timeout=%s]", logPrefix, oldTimeout));
    throw e;
  }
  request.addMarker(String.format("%s-retry [timeout=%s]", logPrefix, oldTimeout));
}
 
开发者ID:nordfalk,项目名称:EsperantoRadio,代码行数:20,代码来源:DrBasicNetwork.java


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