private void alertConcerned(Object... params) { Callback callback; for (WeakReference<Callback> cb : concerned) { callback = cb.get(); Log.d(TAG, "alerting: " + cb + " = " + callback); if (callback != null) { callback.callback(params); } } if (throttle != null) { throttle.requestDidComplete(this); } }
public void addRequest(WebRequest request) { // filled out by caller throttle.addRequest(request); }
public void addRequest(String url, int type, Callback callback) { WebRequest request = new WebRequest(url, type); request.addCallback(callback); throttle.addRequest(request); }