public abstract class

BaseNetworkFetcher

extends Object
implements NetworkFetcher<FETCH_STATE extends FetchState>
java.lang.Object
   ↳ com.facebook.imagepipeline.producers.BaseNetworkFetcher<FETCH_STATE extends com.facebook.imagepipeline.producers.FetchState>
Known Direct Subclasses

Class Overview

Base class for NetworkFetcher.

Intermediate results are propagated.

{#code getExtraMap} returns null.

Summary

Public Constructors
BaseNetworkFetcher()
Public Methods
Map<String, String> getExtraMap(FETCH_STATE fetchState, int byteSize)
Gets a map containing extra parameters to pass to the listeners.
void onFetchCompletion(FETCH_STATE fetchState, int byteSize)
Called after the fetch completes.
boolean shouldPropagate(FETCH_STATE fetchState)
Gets whether the intermediate results should be propagated.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.imagepipeline.producers.NetworkFetcher

Public Constructors

public BaseNetworkFetcher ()

Public Methods

public Map<String, String> getExtraMap (FETCH_STATE 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 (FETCH_STATE 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

public boolean shouldPropagate (FETCH_STATE fetchState)

Gets whether the intermediate results should be propagated.

In addition to the requirements of this method, intermediate results are throttled so that a maximum of one every 100 ms is propagated. This is to conserve CPU and other resources.

Not applicable if progressive rendering is disabled or not supported for this image.

Parameters
fetchState the fetch-specific state
Returns
  • whether the intermediate results should be propagated