Back to Fresco

BaseProducerContext

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

3.6.038.5 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Annotations

Packages | Classes

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

public class

BaseProducerContext

extends Object
implements ProducerContext

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

| Known Direct Subclasses

SettableProducerContext

| SettableProducerContext | ProducerContext that allows the client to change its internal state. |

|

Class Overview

ProducerContext that can be cancelled. Exposes low level API to manipulate state of the ProducerContext.

Summary

Fields
public static final Set<String>
Public Constructors
Public Methods
void
Adds callbacks to the set of callbacks that are executed at various points during the processing of a request.
static void
Calls onCancellationRequested on each element of the list.
static void
Calls onIsIntermediateResultExpected on each element of the list.
static void
Calls onIsPrefetchChanged on each element of the list.
static void
Calls onPriorityChanged on each element of the list.
void
Cancels the request processing and calls appropriate callbacks.
synchronized List<ProducerContextCallbacks>
Marks this ProducerContext as cancelled.
Object
EncodedImageOrigin
<T> T
<E> E
Map<String, Object>
String
ImagePipelineConfig
ImageRequest
ImageRequest.RequestLevel
synchronized Priority
ProducerListener2
String
synchronized boolean
synchronized boolean
synchronized boolean
void
void
Helper to set ORIGIN
void
Helper to set ORIGIN and ORIGIN_SUBCATEGORY
void
void
synchronized List<ProducerContextCallbacks>
Changes isIntermediateResultExpected property.
synchronized List<ProducerContextCallbacks>
Changes isPrefetch property.
synchronized List<ProducerContextCallbacks>
Changes priority.

| [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.ProducerContext

| 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) |

|

Fields

public static final Set<String> INITIAL_KEYS

Public Constructors

public BaseProducerContext(ImageRequest imageRequest, String id, ProducerListener2 producerListener, Object callerContext, ImageRequest.RequestLevel lowestPermittedRequestLevel, boolean isPrefetch, boolean isIntermediateResultExpected, Priority priority, ImagePipelineConfig imagePipelineConfig)

public BaseProducerContext(ImageRequest imageRequest, String id, String uiComponentId, ProducerListener2 producerListener, Object callerContext, ImageRequest.RequestLevel lowestPermittedRequestLevel, boolean isPrefetch, boolean isIntermediateResultExpected, Priority priority, ImagePipelineConfig imagePipelineConfig)

Public Methods

public void addCallbacks(ProducerContextCallbacks callbacks)

Adds callbacks to the set of callbacks that are executed at various points during the processing of a request.

Parameters

| callbacks | callbacks to be executed |

public static void callOnCancellationRequested(List<ProducerContextCallbacks> callbacks)

Calls onCancellationRequested on each element of the list. Does nothing if list == null

public static void callOnIsIntermediateResultExpectedChanged(List<ProducerContextCallbacks> callbacks)

Calls onIsIntermediateResultExpected on each element of the list. Does nothing if list == null

public static void callOnIsPrefetchChanged(List<ProducerContextCallbacks> callbacks)

Calls onIsPrefetchChanged on each element of the list. Does nothing if list == null

public static void callOnPriorityChanged(List<ProducerContextCallbacks> callbacks)

Calls onPriorityChanged on each element of the list. Does nothing if list == null

public void cancel()

Cancels the request processing and calls appropriate callbacks.

public synchronized List<ProducerContextCallbacks> cancelNoCallbacks()

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.

Returns
  • list of callbacks if the value actually changes, null otherwise
See Also
  • callOnCancellationRequested(List)

public Object getCallerContext()

public EncodedImageOrigin getEncodedImageOrigin()

public T getExtra(String key)

public E getExtra(String key, E valueIfNotFound)

public Map<String, Object> getExtras()

public String getId()

public ImagePipelineConfig getImagePipelineConfig()

public ImageRequest getImageRequest()

public ImageRequest.RequestLevel getLowestPermittedRequestLevel()

public synchronized Priority getPriority()

public ProducerListener2 getProducerListener()

public String getUiComponentId()

public synchronized boolean isCancelled()

public synchronized boolean isIntermediateResultExpected()

public synchronized boolean isPrefetch()

public void putExtras(Map<String, ?> extras)

public void putOriginExtra(String origin)

Helper to set ORIGIN

public void putOriginExtra(String origin, String subcategory)

Helper to set ORIGIN and ORIGIN_SUBCATEGORY

public void setEncodedImageOrigin(EncodedImageOrigin encodedImageOrigin)

public void setExtra(String key, Object value)

public synchronized List<ProducerContextCallbacks> setIsIntermediateResultExpectedNoCallbacks(boolean isIntermediateResultExpected)

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.

Returns
  • list of callbacks if the value actually changes, null otherwise
See Also
  • #callOnIntermediateResultChanged

public synchronized List<ProducerContextCallbacks> setIsPrefetchNoCallbacks(boolean isPrefetch)

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.

Returns
  • list of callbacks if the value actually changes, null otherwise
See Also
  • callOnIsPrefetchChanged(List)

public synchronized List<ProducerContextCallbacks> setPriorityNoCallbacks(Priority priority)

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.

Returns
  • list of callbacks if the value actually changes, null otherwise
See Also
  • callOnPriorityChanged(List)

+Generated by Doclava. +