Back to Fresco

AbstractProducerToDataSourceAdapter

docs/javadoc/reference/com/facebook/imagepipeline/datasource/AbstractProducerToDataSourceAdapter.html

3.6.020.6 KB
Original Source

Fresco

|

|

Packages | Classes

Classes

Packages | Classes

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

public abstract class

AbstractProducerToDataSourceAdapter

extends AbstractDataSource<T>
implements HasImageRequest

| java.lang.Object | | ↳ | com.facebook.datasource.AbstractDataSource<T> | | | ↳ | com.facebook.imagepipeline.datasource.AbstractProducerToDataSourceAdapter<T> |

| Known Direct Subclasses

CloseableProducerToDataSourceAdapter<T>, ProducerToDataSourceAdapter<T>

| CloseableProducerToDataSourceAdapter<T> | DataSource> backed by a Producer> | | ProducerToDataSourceAdapter<T> | DataSource backed by a Producer |

|

Class Overview

DataSource backed by a Producer

Summary

Protected Constructors
Public Methods
boolean
Cancels the ongoing request and releases all associated resources.
ImageRequest
Protected Methods
Map<String, Object>
void

| [Expand] Inherited Methods | | --- | | From class com.facebook.datasource.AbstractDataSource

| boolean | close() Cancels the ongoing request and releases all associated resources. | | void | closeResult(T result) Subclasses should override this method to close the result that is not needed anymore. | | static AbstractDataSource.DataSourceInstrumenter | getDataSourceInstrumenter() | | Map<String, Object> | getExtras() | | synchronized Throwable | getFailureCause() | | synchronized float | getProgress() | | synchronized T | getResult() The most recent result of the asynchronous computation. | | synchronized boolean | hasFailed() | | boolean | hasMultipleResults() | | synchronized boolean | hasResult() | | synchronized boolean | isClosed() | | synchronized boolean | isFinished() | | void | notifyDataSubscriber(DataSubscriber<T> dataSubscriber, Executor executor, boolean isFailure, boolean isCancellation) | | void | notifyProgressUpdate() | | static void | provideInstrumenter(AbstractDataSource.DataSourceInstrumenter dataSourceInstrumenter) | | void | setExtras(Map<String, Object> extras) | | boolean | setFailure(Throwable throwable) Subclasses should invoke this method to set the failure. | | boolean | setFailure(Throwable throwable, Map<String, Object> extras) | | boolean | setProgress(float progress) Subclasses should invoke this method to set the progress. | | boolean | setResult(T value, boolean isLast, Map<String, Object> extras) Subclasses should invoke this method to set the result to value. | | boolean | setResult(T value, boolean isLast) | | void | subscribe(DataSubscriber<T> dataSubscriber, Executor executor) Subscribe for notifications whenever the state of the DataSource changes. |

| | 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.datasource.DataSource

| abstract boolean | close() Cancels the ongoing request and releases all associated resources. | | abstract Map<String, Object> | getExtras() | | abstract Throwable | getFailureCause() | | abstract float | getProgress() | | abstract T | getResult() The most recent result of the asynchronous computation. | | abstract boolean | hasFailed() | | abstract boolean | hasMultipleResults() | | abstract boolean | hasResult() | | abstract boolean | isClosed() | | abstract boolean | isFinished() | | abstract void | subscribe(DataSubscriber<T> dataSubscriber, Executor executor) Subscribe for notifications whenever the state of the DataSource changes. |

| | From interface com.facebook.imagepipeline.request.HasImageRequest

| abstract ImageRequest | getImageRequest() |

|

Protected Constructors

protected AbstractProducerToDataSourceAdapter(Producer<T> producer, SettableProducerContext settableProducerContext, RequestListener2 requestListener)

Public Methods

public boolean close()

Cancels the ongoing request and releases all associated resources.

Subsequent calls to getResult() will return null.

Returns
  • true if the data source is closed for the first time

public ImageRequest getImageRequest()

Protected Methods

protected Map<String, Object> getExtras(ProducerContext producerContext)

protected void onNewResultImpl(T result, int status, ProducerContext producerContext)

+Generated by Doclava. +