public class

VolleyNetworkFetcher

extends BaseNetworkFetcher<FETCH_STATE extends FetchState>
java.lang.Object
   ↳ com.facebook.imagepipeline.producers.BaseNetworkFetcher<FETCH_STATE extends com.facebook.imagepipeline.producers.FetchState>
     ↳ com.facebook.imagepipeline.backends.volley.VolleyNetworkFetcher

Class Overview

Network fetcher that uses Volley as its backend. The request being made will bypass Volley's cache.

Volley does not allow access to a InputStream. Therefore, responses will be passed along as complete byte arrays, which will not allow for progressive JPEG streaming.

Summary

Nested Classes
class VolleyNetworkFetcher.VolleyNetworkFetchState  
Public Constructors
VolleyNetworkFetcher(RequestQueue requestQueue)
Public Methods
VolleyNetworkFetcher.VolleyNetworkFetchState createFetchState(Consumer<EncodedImage> consumer, ProducerContext context)
void fetch(VolleyNetworkFetcher.VolleyNetworkFetchState fetchState, NetworkFetcher.Callback callback)
Map<String, String> getExtraMap(VolleyNetworkFetcher.VolleyNetworkFetchState fetchState, int byteSize)
Gets a map containing extra parameters to pass to the listeners.
void onFetchCompletion(VolleyNetworkFetcher.VolleyNetworkFetchState fetchState, int byteSize)
Called after the fetch completes.
[Expand]
Inherited Methods
From class com.facebook.imagepipeline.producers.BaseNetworkFetcher
From class java.lang.Object
From interface com.facebook.imagepipeline.producers.NetworkFetcher

Public Constructors

public VolleyNetworkFetcher (RequestQueue requestQueue)

Parameters
requestQueue The Volley RequestQueue to use

Public Methods

public Map<String, String> getExtraMap (VolleyNetworkFetcher.VolleyNetworkFetchState fetchState, int byteSize)

Gets a map containing extra parameters to pass to the listeners.

Returning map is optional and is useful for instrumentation purposes.

This map won't be modified by the caller.

Parameters
fetchState the fetch-specific state
byteSize size of the data in bytes
Returns
  • a map with extra parameters

public void onFetchCompletion (VolleyNetworkFetcher.VolleyNetworkFetchState fetchState, int byteSize)

Called after the fetch completes.

Implementing this method is optional and is useful for instrumentation purposes.

Parameters
fetchState the fetch-specific state
byteSize size of the data in bytes