Back to Fresco

StatefulProducerRunnable

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

3.6.023.7 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Annotations

Packages | Classes

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

public abstract class

StatefulProducerRunnable

extends StatefulRunnable<T>

| java.lang.Object | | ↳ | com.facebook.common.executors.StatefulRunnable<T> | | | ↳ | com.facebook.imagepipeline.producers.StatefulProducerRunnable<T> |

Class Overview

StatefulRunnable intended to be used by producers.

Class implements common functionality related to handling producer instrumentation and resource management.

Summary

| [Expand] Inherited Constants | | --- | | From class com.facebook.common.executors.StatefulRunnable

| int | STATE_CANCELLED | | | int | STATE_CREATED | | | int | STATE_FAILED | | | int | STATE_FINISHED | | | int | STATE_STARTED | |

|

| [Expand] Inherited Fields | | --- | | From class com.facebook.common.executors.StatefulRunnable

| protected final AtomicInteger | mState | |

|

Public Constructors
Protected Methods
abstract void
Called after onSuccess callback completes in order to dispose the result.
Map<String, String>
Create extra map for cancellation
Map<String, String>
Create extra map for exception
Map<String, String>
Create extra map for result
void
Called when the runnable is cancelled.
void
Called if exception occurred during computation.
void
Called after computing result successfully.

| [Expand] Inherited Methods | | --- | | From class com.facebook.common.executors.StatefulRunnable

| void | cancel() | | void | disposeResult(T result) Called after onSuccess callback completes in order to dispose the result. | | abstract T | getResult() | | void | onCancellation() Called when the runnable is cancelled. | | void | onFailure(Exception e) Called if exception occurred during computation. | | void | onSuccess(T result) Called after computing result successfully. | | final void | run() |

| | 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 java.lang.Runnable

| abstract void | run() |

|

Public Constructors

public StatefulProducerRunnable(Consumer<T> consumer, ProducerListener2 producerListener, ProducerContext producerContext, String producerName)

Protected Methods

protected abstract void disposeResult(T result)

Called after onSuccess callback completes in order to dispose the result.

protected Map<String, String> getExtraMapOnCancellation()

Create extra map for cancellation

protected Map<String, String> getExtraMapOnFailure(Exception exception)

Create extra map for exception

protected Map<String, String> getExtraMapOnSuccess(T result)

Create extra map for result

protected void onCancellation()

Called when the runnable is cancelled.

protected void onFailure(Exception e)

Called if exception occurred during computation.

protected void onSuccess(T result)

Called after computing result successfully.

+Generated by Doclava. +