com.facebook.imagepipeline.producers.ProducerContext |
Known Indirect Subclasses |
Used to pass context information to producers.
Object implementing this interface is passed to all producers participating in pipeline request . Its responsibility is to instruct producers which image should be fetched/decoded/resized/cached etc. This class also handles request cancellation.
In order to be notified when cancellation is requested, a producer should use the runOnCancellationRequested
method which takes an instance of Runnable and executes it when the
pipeline client cancels the image request.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
@interface | ProducerContext.ExtraKeys |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
addCallbacks(ProducerContextCallbacks callbacks)
Adds callbacks to the set of callbacks that are executed at various points during the
processing of a request.
| ||||||||||
abstract Object | getCallerContext() | ||||||||||
abstract EncodedImageOrigin | getEncodedImageOrigin() | ||||||||||
abstract <E> E | getExtra(String key, E valueIfNotFound) | ||||||||||
abstract <E> E | getExtra(String key) | ||||||||||
abstract Map<String, Object> | getExtras() | ||||||||||
abstract String | getId() | ||||||||||
abstract ImagePipelineConfig | getImagePipelineConfig() | ||||||||||
abstract ImageRequest | getImageRequest() | ||||||||||
abstract ImageRequest.RequestLevel | getLowestPermittedRequestLevel() | ||||||||||
abstract Priority | getPriority() | ||||||||||
abstract ProducerListener2 | getProducerListener() | ||||||||||
abstract String | getUiComponentId() | ||||||||||
abstract boolean | isIntermediateResultExpected() | ||||||||||
abstract boolean | isPrefetch() | ||||||||||
abstract void | putExtras(Map<String, ?> extras) | ||||||||||
abstract void |
putOriginExtra(String origin)
Helper to set
ORIGIN | ||||||||||
abstract void |
putOriginExtra(String origin, String subcategory)
Helper to set
ORIGIN and ORIGIN_SUBCATEGORY | ||||||||||
abstract void | setEncodedImageOrigin(EncodedImageOrigin encodedImageOrigin) | ||||||||||
abstract <E> void | setExtra(String key, E value) |
Adds callbacks to the set of callbacks that are executed at various points during the processing of a request.
callbacks | callbacks to be executed |
---|
ImageRequest.RequestLevel
Helper to set ORIGIN
and ORIGIN_SUBCATEGORY