java.lang.Object | |
↳ | com.facebook.imagepipeline.producers.BaseProducerContext |
Known Direct Subclasses |
ProducerContext that can be cancelled. Exposes low level API to manipulate state of the ProducerContext.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final Set<String> | INITIAL_KEYS |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BaseProducerContext(ImageRequest imageRequest, String id, ProducerListener2 producerListener, Object callerContext, ImageRequest.RequestLevel lowestPermittedRequestLevel, boolean isPrefetch, boolean isIntermediateResultExpected, Priority priority, ImagePipelineConfig imagePipelineConfig) | |||||||||||
BaseProducerContext(ImageRequest imageRequest, String id, String uiComponentId, ProducerListener2 producerListener, Object callerContext, ImageRequest.RequestLevel lowestPermittedRequestLevel, boolean isPrefetch, boolean isIntermediateResultExpected, Priority priority, ImagePipelineConfig imagePipelineConfig) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addCallbacks(ProducerContextCallbacks callbacks)
Adds callbacks to the set of callbacks that are executed at various points during the
processing of a request.
| ||||||||||
static void |
callOnCancellationRequested(List<ProducerContextCallbacks> callbacks)
Calls
onCancellationRequested on each element of the list. | ||||||||||
static void |
callOnIsIntermediateResultExpectedChanged(List<ProducerContextCallbacks> callbacks)
Calls
onIsIntermediateResultExpected on each element of the list. | ||||||||||
static void |
callOnIsPrefetchChanged(List<ProducerContextCallbacks> callbacks)
Calls
onIsPrefetchChanged on each element of the list. | ||||||||||
static void |
callOnPriorityChanged(List<ProducerContextCallbacks> callbacks)
Calls
onPriorityChanged on each element of the list. | ||||||||||
void |
cancel()
Cancels the request processing and calls appropriate callbacks.
| ||||||||||
synchronized List<ProducerContextCallbacks> |
cancelNoCallbacks()
Marks this ProducerContext as cancelled.
| ||||||||||
Object | getCallerContext() | ||||||||||
EncodedImageOrigin | getEncodedImageOrigin() | ||||||||||
<T> T | getExtra(String key) | ||||||||||
<E> E | getExtra(String key, E valueIfNotFound) | ||||||||||
Map<String, Object> | getExtras() | ||||||||||
String | getId() | ||||||||||
ImagePipelineConfig | getImagePipelineConfig() | ||||||||||
ImageRequest | getImageRequest() | ||||||||||
ImageRequest.RequestLevel | getLowestPermittedRequestLevel() | ||||||||||
synchronized Priority | getPriority() | ||||||||||
ProducerListener2 | getProducerListener() | ||||||||||
String | getUiComponentId() | ||||||||||
synchronized boolean | isCancelled() | ||||||||||
synchronized boolean | isIntermediateResultExpected() | ||||||||||
synchronized boolean | isPrefetch() | ||||||||||
void | putExtras(Map<String, ?> extras) | ||||||||||
void |
putOriginExtra(String origin)
Helper to set
ORIGIN | ||||||||||
void |
putOriginExtra(String origin, String subcategory)
Helper to set
ORIGIN and ORIGIN_SUBCATEGORY | ||||||||||
void | setEncodedImageOrigin(EncodedImageOrigin encodedImageOrigin) | ||||||||||
void | setExtra(String key, Object value) | ||||||||||
synchronized List<ProducerContextCallbacks> |
setIsIntermediateResultExpectedNoCallbacks(boolean isIntermediateResultExpected)
Changes isIntermediateResultExpected property.
| ||||||||||
synchronized List<ProducerContextCallbacks> |
setIsPrefetchNoCallbacks(boolean isPrefetch)
Changes isPrefetch property.
| ||||||||||
synchronized List<ProducerContextCallbacks> |
setPriorityNoCallbacks(Priority priority)
Changes priority.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.facebook.imagepipeline.producers.ProducerContext
|
Adds callbacks to the set of callbacks that are executed at various points during the processing of a request.
callbacks | callbacks to be executed |
---|
Calls onCancellationRequested
on each element of the list. Does nothing if list == null
Calls onIsIntermediateResultExpected
on each element of the list. Does nothing if list
== null
Calls onIsPrefetchChanged
on each element of the list. Does nothing if list == null
Calls onPriorityChanged
on each element of the list. Does nothing if list == null
Cancels the request processing and calls appropriate callbacks.
Marks this ProducerContext as cancelled.
This method does not call any callbacks. Instead, caller of this method is responsible for iterating over returned list and calling appropriate method on each callback object.
Helper to set ORIGIN
and ORIGIN_SUBCATEGORY
Changes isIntermediateResultExpected property.
This method does not call any callbacks. Instead, caller of this method is responsible for iterating over returned list and calling appropriate method on each callback object.
Changes isPrefetch property.
This method does not call any callbacks. Instead, caller of this method is responsible for iterating over returned list and calling appropriate method on each callback object.
Changes priority.
This method does not call any callbacks. Instead, caller of this method is responsible for iterating over returned list and calling appropriate method on each callback object.