public <T> void addToRequestQueue(Request<T> req, String tag) { // set the default tag if tag is empty req.setTag(TextUtils.isEmpty(tag) ? "TAG" : tag); VolleyLog.d("Adding request to queue: %s", req.getUrl()); getRequestQueue().add(req); }
private void addToRequestQueue(Request req, String tag) { if (null == tag) { tag = requestUrlToTag.get(req.getUrl()); if (null == tag) { tag = HackApplication.randomString.nextString(); requestUrlToTag.put(req.getUrl(), tag); } req.setTag(tag); } else { req.setTag(tag); } cancelFromRequestQueue(req, tag); Log.e(TAG, "URL: -> " + req.getUrl()); makaanGetRequestQueue.add(req); }
public static void addRequest(Request<?> request, Object tag) { if (tag != null) { request.setTag(tag); } mRequestQueue.add(request); // Logger.d("addRequest = " + request.getUrl()); }
public <T> void addToRequestQueue(Request<T> req) { req.setTag(TAG); req.setRetryPolicy( new DefaultRetryPolicy( DefaultRetryPolicy.DEFAULT_TIMEOUT_MS * 2, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)); getRequestQueue().add(req); }
public void addToQueue(Request request) { if (request != null) { request.setTag(this); if (fRequestQueue == null) fRequestQueue = volley.getRequestQueue(); request.setRetryPolicy( new DefaultRetryPolicy(60000, 3, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)); onPreStartConnection(); fRequestQueue.add(request); } }
public static void searchTweet(Context context, String pUrl, NetworkCallback callback) { StringBuilder url = new StringBuilder(pUrl); url.append("&count=" + DEFAULT_PAGE_SIZE); Request<String> volleyTypeRequest = null; volleyTypeRequest = bundleToVolleyRequestWithSoftTtl( context, Request.Method.GET, null, url.toString(), callback); volleyTypeRequest.setTag(callback); volleyTypeRequest.setShouldCache(true); dispatchToQueue(volleyTypeRequest, context); }
public static <T> void addRequest(RequestQueue requestQueue, Request<T> request, Object tag) { if (tag != null) { request.setTag(tag); } request.setShouldCache(false); request.setRetryPolicy( new DefaultRetryPolicy( TIME_OUT, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)); requestQueue.add(request); }
public <T> void addToRequestQueue(Request<T> req, String tag) { req.setTag(TextUtils.isEmpty(tag) ? TAG : tag); getRequestQueue().add(req); }
public <T> void addToRequestQueue(Request<T> req, String tag) { // set the default tag if tag is empty req.setTag(TextUtils.isEmpty(tag) ? TAG : tag); getRequestQueue().add(req); }
public void submitNetworkRequest(String requestTag, Request request) { requestQueue.cancelAll(requestTag); requestQueue.add(request); request.setTag(requestTag); }
/** * @param request 请求 * @param tag 上下文 */ public static void addRequest(Request<?> request, Object tag) { if (tag != null) { request.setTag(tag); } mRequestQueue.add(request); }
/** * Adds the specified request to the global queue using the Default TAG. * * @param req */ public <T> void addToRequestQueue(Request<T> req) { // set the default tag if tag is empty req.setTag(TAG); getRequestQueue().add(req); }
public static <T> Request<T> startRequest(Request<T> paramRequest, Object paramObject) { paramRequest.setTag(paramObject); Request localRequest = queue.add(paramRequest); queue.start(); return localRequest; }
public void addRequest(Request request, Object tag) { request.setTag(tag); RequestManager.getInstance(getActivity()).addRequest(request); }
public <T> void addToRequestQueue(Request<T> req) { req.setTag(TAG); getRequestQueue().add(req); }
private static void addToRequestQueue(Object tag, Request request) { if (tag != null) { request.setTag(tag); } requestQueue.add(request); }
public void addToRequestQueue(Request request, String tag) { request.setTag(TextUtils.isEmpty(tag) ? TAG : tag); getRequestQueue().add(request); }