docs/javadoc/reference/com/facebook/imagepipeline/producers/Consumer.html
|
|
Consumer<T>
NetworkFetcher<FETCH_STATE extends FetchState>
Producer<T>
BaseConsumer<T>
BaseNetworkFetcher<FETCH_STATE extends FetchState>
DelegatingConsumer<I, O>
HttpUrlConnectionNetworkFetcher.HttpUrlConnectionNetworkFetchState
MultiplexProducer<K, T extends Closeable>
NullProducer<T>
PostprocessedBitmapMemoryCacheProducer.CachedPostprocessorConsumer
PriorityNetworkFetcher<FETCH_STATE extends FetchState>
PriorityNetworkFetcher.PriorityFetchState<FETCH_STATE extends FetchState>
Summary: Nested Classes | Constants | Methods | [Expand All]
public interface
| com.facebook.imagepipeline.producers.Consumer<T> |
| Known Indirect Subclasses
BaseConsumer<T>, DelegatingConsumer<I, O>, PostprocessedBitmapMemoryCacheProducer.CachedPostprocessorConsumer
| BaseConsumer<T> | Base implementation of Consumer that implements error handling conforming to the Consumer's contract. | | DelegatingConsumer<I, O> | Delegating consumer. | | PostprocessedBitmapMemoryCacheProducer.CachedPostprocessorConsumer | |
|
Consumes data produced by Producer.
The producer uses this interface to notify its client when new data is ready or an error occurs. Execution of the image request is structured as a sequence of Producers. Each one consumes data produced by producer preceding it in the sequence.
For example decode is a producer that consumes data produced by the disk cache get producer.
The consumer is passed new intermediate results via onNewResult(isLast = false) method. Each consumer should expect that one of the following methods will be called exactly once, as the very last producer call:
Implementations of this interface must be thread safe, as callback methods might be called on different threads.
| Nested Classes |
|---|
| @interface |
| Constants |
|---|
| int |
| int |
| int |
| int |
| int |
| int |
| Public Methods |
|---|
| abstract void |
| Called by a producer whenever it is cancelled and won't produce any more results |
| abstract void |
| Called by a producer whenever it terminates further work due to Throwable being thrown. |
| abstract void |
| Called by a producer whenever new data is produced. |
| abstract void |
| Called when the progress updates. |
Status flag to show the result should not be cached in disk or encoded caches, even if it's the last result.
Constant Value: 2 (0x00000002)
Status flag to show whether the result being received is the last one coming or to expect more.
Constant Value: 1 (0x00000001)
Status flag to show the result does not represent the whole image, just part of it. This may be due to a cancellation or failure while the file was being downloaded or because only part of the image was requested.
Constant Value: 8 (0x00000008)
Status flag to show whether the result is a placeholder for the final result. Should only be set if IS_LAST is not set.
Constant Value: 4 (0x00000004)
Status flag that indicates whether the given image has been resized.
Constant Value: 16 (0x00000010)
Convenience constant for a status with no flags set. The absence of IS_LAST means this status can be used for intermediate results. This constant should never be used when checking for flags.
Constant Value: 0 (0x00000000)
Called by a producer whenever it is cancelled and won't produce any more results
Called by a producer whenever it terminates further work due to Throwable being thrown. This method should not throw an exception.
Called by a producer whenever new data is produced. This method should not throw an exception.
In case when result is closeable resource producer will close it after onNewResult returns. Consumer needs to make copy of it if the resource must be accessed after that. Fortunately, with CloseableReferences, that should not impose too much overhead.
| status | bitwise values describing the returned result |
for status flags Called when the progress updates.
| progress | in range [0, 1] |
+Generated by Doclava. +