Back to Fresco

HttpUrlConnectionNetworkFetcher

docs/javadoc/reference/com/facebook/imagepipeline/producers/HttpUrlConnectionNetworkFetcher.html

3.6.027.8 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Annotations

Packages | Classes

Summary: Nested Classes | Constants | Ctors | Methods | Inherited Methods | [Expand All]

public class

HttpUrlConnectionNetworkFetcher

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.producers.HttpUrlConnectionNetworkFetcher |

Class Overview

Network fetcher that uses the simplest Android stack.

Apps requiring more sophisticated networking should implement their own NetworkFetcher.

Summary

Nested Classes
class
Constants
int
int
int
Public Constructors
Public Methods
HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState
void
Map<String, String>
Gets a map containing extra parameters to pass to the listeners.
void
Called after the fetch completes.

| [Expand] Inherited Methods | | --- | | From class com.facebook.imagepipeline.producers.BaseNetworkFetcher

| 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. |

| | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

| | From interface com.facebook.imagepipeline.producers.NetworkFetcher

| abstract FETCH_STATE | createFetchState(Consumer<EncodedImage> consumer, ProducerContext producerContext) Creates a new instance of the FetchState-derived object used to store state. | | abstract void | fetch(FETCH_STATE fetchState, NetworkFetcher.Callback callback) Initiates the network fetch and informs the producer when a response is received via the provided callback. | | abstract Map<String, String> | getExtraMap(FETCH_STATE fetchState, int byteSize) Gets a map containing extra parameters to pass to the listeners. | | abstract void | onFetchCompletion(FETCH_STATE fetchState, int byteSize) Called after the fetch completes. | | abstract boolean | shouldPropagate(FETCH_STATE fetchState) Gets whether the intermediate results should be propagated. |

|

Constants

public static final int HTTP_DEFAULT_TIMEOUT

Constant Value: 30000 (0x00007530)

public static final int HTTP_PERMANENT_REDIRECT

Constant Value: 308 (0x00000134)

public static final int HTTP_TEMPORARY_REDIRECT

Constant Value: 307 (0x00000133)

Public Constructors

public HttpUrlConnectionNetworkFetcher()

public HttpUrlConnectionNetworkFetcher(int httpConnectionTimeout)

public HttpUrlConnectionNetworkFetcher(String userAgent, int httpConnectionTimeout)

public HttpUrlConnectionNetworkFetcher(String userAgent, Map<String, String> requestHeaders, int httpConnectionTimeout)

Public Methods

public HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState createFetchState(Consumer<EncodedImage> consumer, ProducerContext context)

public void fetch(HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState fetchState, NetworkFetcher.Callback callback)

public Map<String, String> getExtraMap(HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState 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(HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState 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 |

+Generated by Doclava. +