Back to Fresco

BaseBitmapDataSubscriber

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

3.6.016.0 KB
Original Source

Fresco

|

|

Packages | Classes

Classes

Packages | Classes

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

public abstract class

BaseBitmapDataSubscriber

extends BaseDataSubscriber<T>

| java.lang.Object | | ↳ | com.facebook.datasource.BaseDataSubscriber<T> | | | ↳ | com.facebook.imagepipeline.datasource.BaseBitmapDataSubscriber |

Class Overview

Implementation of DataSubscriber for cases where the client wants access to a bitmap.

Sample usage:

dataSource.subscribe(
   new BaseBitmapDataSubscriber() {
     @Override
     public void onNewResultImpl(@Nullable Bitmap bitmap) {
       // Pass bitmap to system, which makes a copy of the bitmap.
       updateStatus(bitmap);
       // No need to do any cleanup.
     }

     @Override
     public void onFailureImpl(DataSource dataSource) {
       // No cleanup required here.
     }
   });

Summary

Public Constructors
Public Methods
void
Protected Methods
abstract void
The bitmap provided to this method is only guaranteed to be around for the lifespan of the method.

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

| void | onCancellation(DataSource<T> dataSource) Called whenever the request is cancelled (a request being cancelled means that is was closed before it finished). | | void | onFailure(DataSource<T> dataSource) Called whenever an error occurs inside of the pipeline. | | abstract void | onFailureImpl(DataSource<T> dataSource) | | void | onNewResult(DataSource<T> dataSource) Called whenever a new value is ready to be retrieved from the DataSource. | | abstract void | onNewResultImpl(DataSource<T> dataSource) | | void | onProgressUpdate(DataSource<T> dataSource) Called when the progress updates. |

| | 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.DataSubscriber

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

public BaseBitmapDataSubscriber()

Public Methods

public void onNewResultImpl(DataSource<CloseableReference<CloseableImage>> dataSource)

Protected Methods

protected abstract void onNewResultImpl(Bitmap bitmap)

The bitmap provided to this method is only guaranteed to be around for the lifespan of the method.

The framework will free the bitmap's memory after this method has completed.

+Generated by Doclava. +