Lines Matching refs:request

55      * that we can coalesce multiple requests to the same URL into a single network request.
123 * 1. Upon being attached to a request, onResponse(response, true) will
134 * Listens for non-error changes to the loading of the image request.
136 * @param response Holds all information pertaining to the request, as well
165 * request is fulfilled.
175 * Issues a bitmap request with the given URL if that image is not available
177 * relating to the request (as well as the default image if the requested
183 * @return A container object that contains all of the properties of the request, as well as
193 // Try to look up the request in the cache of remote images.
209 // Check to see if a request is already in-flight.
210 BatchedImageRequest request = mInFlightRequests.get(cacheKey);
211 if (request != null) {
212 // If it is, add this request to the list of listeners.
213 request.addContainer(imageContainer);
217 // The request is not already in flight. Send the new request to the network and
250 * @param cacheKey The cache key that is associated with the image request.
257 // remove the request from the list of in-flight requests.
258 BatchedImageRequest request = mInFlightRequests.remove(cacheKey);
260 if (request != null) {
262 request.mResponseBitmap = response;
265 batchResponse(cacheKey, request);
271 * @param cacheKey The cache key that is associated with the image request.
275 // Remove this request from the list of in-flight requests.
276 BatchedImageRequest request = mInFlightRequests.remove(cacheKey);
278 // Set the error for this request
279 request.setError(error);
281 if (request != null) {
283 batchResponse(cacheKey, request);
288 * Container object for all of the data surrounding an image request.
299 /** The cache key that was associated with the request */
302 /** The request URL that was specified */
320 * Releases interest in the in-flight request (and cancels it if no one else is listening).
327 BatchedImageRequest request = mInFlightRequests.get(mCacheKey);
328 if (request != null) {
329 boolean canceled = request.removeContainerAndCancelIfNecessary(this);
335 request = mBatchedResponses.get(mCacheKey);
336 if (request != null) {
337 request.removeContainerAndCancelIfNecessary(this);
338 if (request.mContainers.size() == 0) {
346 * Returns the bitmap associated with the request URL if it has been loaded, null otherwise.
365 /** The request being tracked */
368 /** The result of the request being tracked by this item */
374 /** List of all of the active ImageContainers that are interested in the request */
379 * @param request The request being tracked
380 * @param container The ImageContainer of the person who initiated the request.
382 public BatchedImageRequest(Request<?> request, ImageContainer container) {
383 mRequest = request;
403 * the request.
410 * Detatches the bitmap container from the request and cancels the request if no one is
413 * @return True if the request was canceled, false otherwise.
428 * @param request The BatchedImageRequest to be delivered.
429 * @param error The volley error associated with the request (if applicable).
431 private void batchResponse(String cacheKey, BatchedImageRequest request) {
432 mBatchedResponses.put(cacheKey, request);
441 // If one of the callers in the batched request canceled the request
472 * @param url The URL of the request.