Back to Fresco

NetworkFetchProducer

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

3.6.025.6 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Annotations

Packages | Classes

Summary: Constants | Fields | Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]

public class

NetworkFetchProducer

extends Object
implements Producer<T>

| java.lang.Object | | ↳ | com.facebook.imagepipeline.producers.NetworkFetchProducer |

Class Overview

A producer to actually fetch images from the network.

Downloaded bytes may be passed to the consumer as they are downloaded, but not more often than #TIME_BETWEEN_PARTIAL_RESULTS_MS.

Clients should provide an instance of NetworkFetcher to make use of their networking stack. Use HttpUrlConnectionNetworkFetcher as a model.

Summary

Constants
String
String
Fields
protected final PooledByteBufferFactory
Public Constructors
Public Methods
void
Protected Methods
static float
long
void
void
static void
void

| [Expand] Inherited Methods | | --- | | 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.Producer

| abstract void | produceResults(Consumer<T> consumer, ProducerContext context) Start producing results for given context. |

|

Constants

public static final String INTERMEDIATE_RESULT_PRODUCER_EVENT

Constant Value: "intermediate_result"

public static final String PRODUCER_NAME

Constant Value: "NetworkFetchProducer"

Fields

protected final PooledByteBufferFactory mPooledByteBufferFactory

Public Constructors

public NetworkFetchProducer(PooledByteBufferFactory pooledByteBufferFactory, ByteArrayPool byteArrayPool, NetworkFetcher networkFetcher)

Public Methods

public void produceResults(Consumer<EncodedImage> consumer, ProducerContext context)

Protected Methods

protected static float calculateProgress(int downloaded, int total)

protected long getSystemUptime()

protected void handleFinalResult(PooledByteBufferOutputStream pooledOutputStream, FetchState fetchState)

protected void maybeHandleIntermediateResult(PooledByteBufferOutputStream pooledOutputStream, FetchState fetchState)

protected static void notifyConsumer(PooledByteBufferOutputStream pooledOutputStream, int status, BytesRange responseBytesRange, Consumer<EncodedImage> consumer, ProducerContext context)

protected void onResponse(FetchState fetchState, InputStream responseData, int responseContentLength)

Throws

| IOException | |

+Generated by Doclava. +