public interface

DataSubscriber

com.facebook.datasource.DataSubscriber<T>
Known Indirect Subclasses

Class Overview

Subscribes to DataSource.

Summary

Public Methods
abstract void onCancellation(DataSource<T> dataSource)
Called whenever the request is cancelled (a request being cancelled means that is was closed before it finished).
abstract void onFailure(DataSource<T> dataSource)
Called whenever an error occurs inside of the pipeline.
abstract void onNewResult(DataSource<T> dataSource)
Called whenever a new value is ready to be retrieved from the DataSource.
abstract void onProgressUpdate(DataSource<T> dataSource)
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.