docs/javadoc/reference/com/facebook/imagepipeline/producers/BaseConsumer.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: Inherited Constants | Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]
public abstract class
extends Object
implements Consumer<T>
| java.lang.Object | | ↳ | com.facebook.imagepipeline.producers.BaseConsumer<T> |
| Known Direct Subclasses
DelegatingConsumer<I, O>
| DelegatingConsumer<I, O> | Delegating consumer. |
|
| Known Indirect Subclasses
PostprocessedBitmapMemoryCacheProducer.CachedPostprocessorConsumer
| PostprocessedBitmapMemoryCacheProducer.CachedPostprocessorConsumer | |
|
Base implementation of Consumer that implements error handling conforming to the Consumer's contract.
This class also prevents execution of callbacks if one of final methods was called before: onFinish(isLast = true), onFailure or onCancellation.
All callbacks are executed within a synchronized block, so that clients can act as if all callbacks are called on single thread.
| [Expand] Inherited Constants | | --- | | From interface com.facebook.imagepipeline.producers.Consumer
| int | DO_NOT_CACHE_ENCODED | Status flag to show the result should not be cached in disk or encoded caches, even if it's the last result. | | int | IS_LAST | Status flag to show whether the result being received is the last one coming or to expect more. | | int | IS_PARTIAL_RESULT | Status flag to show the result does not represent the whole image, just part of it. | | int | IS_PLACEHOLDER | Status flag to show whether the result is a placeholder for the final result. | | int | IS_RESIZING_DONE | Status flag that indicates whether the given image has been resized. | | int | NO_FLAGS | Convenience constant for a status with no flags set. |
|
| Public Constructors |
|---|
| Public Methods |
|---|
| static boolean |
Checks whether the provided status includes the IS_LAST flag, marking this as the last result the consumer will receive. |
| static boolean |
Checks whether the provided status includes the IS_LAST flag, marking this as the last result the consumer will receive. |
| synchronized void |
| Called by a producer whenever it is cancelled and won't produce any more results |
| synchronized void |
| Called by a producer whenever it terminates further work due to Throwable being thrown. |
| synchronized void |
| Called by a producer whenever new data is produced. |
| synchronized void |
| Called when the progress updates. |
| static int |
| Creates a simple status value which only identifies whether this is the last result. |
| static boolean |
| Checks whether the provided status contains any of the specified flags. |
| static boolean |
| Checks whether the provided status contains a specified flag. |
| static int |
| Updates a provided status by ensuring the specified flag is turned off. |
| static int |
| Updates a provided status by ensuring the specified flag is turned on. |
| Protected Methods |
|---|
| abstract void |
| Called by onCancellation, override this method instead |
| abstract void |
| Called by onFailure, override this method instead |
| abstract void |
| Called by onNewResult, override this method instead. |
| void |
| Called when the progress updates |
| void |
| Called whenever onNewResultImpl or onFailureImpl throw an exception |
| [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.Consumer
| abstract void | onCancellation() Called by a producer whenever it is cancelled and won't produce any more results | | abstract void | onFailure(Throwable t) Called by a producer whenever it terminates further work due to Throwable being thrown. | | abstract void | onNewResult(T newResult, int status) Called by a producer whenever new data is produced. | | abstract void | onProgressUpdate(float progress) Called when the progress updates. |
|
Checks whether the provided status includes the IS_LAST flag, marking this as the last result the consumer will receive.
Checks whether the provided status includes the IS_LAST flag, marking this as the last result the consumer will receive.
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 |
Called when the progress updates.
| progress | in range [0, 1] |
Creates a simple status value which only identifies whether this is the last result.
Checks whether the provided status contains any of the specified flags.
Checks whether the provided status contains a specified flag.
Updates a provided status by ensuring the specified flag is turned off.
Updates a provided status by ensuring the specified flag is turned on.
Called by onCancellation, override this method instead
Called by onFailure, override this method instead
Called by onNewResult, override this method instead.
Called when the progress updates
Called whenever onNewResultImpl or onFailureImpl throw an exception
+Generated by Doclava. +