Back to Fresco

DataSubscriber

docs/javadoc/reference/com/facebook/datasource/DataSubscriber.html

3.6.013.9 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Packages | Classes

Summary: Methods | [Expand All]

public interface

DataSubscriber

| com.facebook.datasource.DataSubscriber<T> |

| Known Indirect Subclasses

BaseBitmapDataSubscriber, BaseBitmapReferenceDataSubscriber, BaseBooleanSubscriber, BaseDataSubscriber<T>, BaseListBitmapDataSubscriber

| BaseBitmapDataSubscriber | Implementation of DataSubscriber for cases where the client wants access to a bitmap. | | BaseBitmapReferenceDataSubscriber | Implementation of DataSubscriber for cases where the client wants access to a bitmap reference. | | BaseBooleanSubscriber | Base implementation of DataSubscriber that ensures that the data source is closed when the subscriber has finished with it. | | BaseDataSubscriber<T> | Base implementation of DataSubscriber that ensures that the data source is closed when the subscriber has finished with it. | | BaseListBitmapDataSubscriber | Implementation of DataSubscriber for cases where the client wants to access a list of bitmaps. |

|

Class Overview

Subscribes to DataSource.

Summary

Public Methods
abstract void
Called whenever the request is cancelled (a request being cancelled means that is was closed before it finished).
abstract void
Called whenever an error occurs inside of the pipeline.
abstract void
Called whenever a new value is ready to be retrieved from the DataSource.
abstract void
Called when the progress updates.

Public Methods

public abstract void onCancellation(DataSource<T> dataSource)

Called whenever the request is cancelled (a request being cancelled means that is was closed before it finished).

No further results will be produced after this method is called.

public abstract void onFailure(DataSource<T> dataSource)

Called whenever an error occurs inside of the pipeline.

No further results will be produced after this method is called.

The throwable resulting from the failure can be obtained using dataSource.getFailureCause.

public abstract void onNewResult(DataSource<T> dataSource)

Called whenever a new value is ready to be retrieved from the DataSource.

To retrieve the new value, call dataSource.getResult().

To determine if the new value is the last, use dataSource.isFinished().

public abstract void onProgressUpdate(DataSource<T> dataSource)

Called when the progress updates.

+Generated by Doclava. +