java.lang.Object | ||
↳ | com.facebook.imagepipeline.producers.BaseNetworkFetcher<FETCH_STATE extends com.facebook.imagepipeline.producers.FetchState> | |
↳ | com.facebook.imagepipeline.producers.HttpUrlConnectionNetworkFetcher |
Network fetcher that uses the simplest Android stack.
Apps requiring more sophisticated networking should implement their own NetworkFetcher
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | HTTP_DEFAULT_TIMEOUT | ||||||||||
int | HTTP_PERMANENT_REDIRECT | ||||||||||
int | HTTP_TEMPORARY_REDIRECT |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
HttpUrlConnectionNetworkFetcher() | |||||||||||
HttpUrlConnectionNetworkFetcher(int httpConnectionTimeout) | |||||||||||
HttpUrlConnectionNetworkFetcher(String userAgent, int httpConnectionTimeout) | |||||||||||
HttpUrlConnectionNetworkFetcher(String userAgent, Map<String, String> requestHeaders, int httpConnectionTimeout) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState | createFetchState(Consumer<EncodedImage> consumer, ProducerContext context) | ||||||||||
void | fetch(HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState fetchState, NetworkFetcher.Callback callback) | ||||||||||
Map<String, String> |
getExtraMap(HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState fetchState, int byteSize)
Gets a map containing extra parameters to pass to the listeners.
| ||||||||||
void |
onFetchCompletion(HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState 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
|
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.
fetchState | the fetch-specific state |
---|---|
byteSize | size of the data in bytes |
Called after the fetch completes.
Implementing this method is optional and is useful for instrumentation purposes.
fetchState | the fetch-specific state |
---|---|
byteSize | size of the data in bytes |