docs/javadoc/reference/com/facebook/imagepipeline/datasource/BaseBitmapReferenceDataSubscriber.html
|
|
Summary: Ctors | Methods | Protected Methods | Inherited Methods | [Expand All]
public abstract class
extends BaseDataSubscriber<T>
| java.lang.Object | | ↳ | com.facebook.datasource.BaseDataSubscriber<T> | | | ↳ | com.facebook.imagepipeline.datasource.BaseBitmapReferenceDataSubscriber |
Implementation of DataSubscriber for cases where the client wants access to a bitmap reference.
Sample usage:
dataSource.subscribe(
new BaseBitmapReferenceDataSubscriber() {
@Override
public void onNewResultImpl(@Nullable CloseableReference bitmapReference) {
// Pass bitmap to another component, which clones the bitmap reference if it needs to
// hold on to the bitmap.
doSomething(bitmapReference);
// No need to do any cleanup.
}
@Override
public void onFailureImpl(DataSource dataSource) {
// No cleanup required here.
}
});
| Public Constructors |
|---|
| Public Methods |
|---|
| void |
| Protected Methods |
|---|
| abstract void |
| The bitmap reference will be closed immediately after this method is called. |
| [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. |
|
The bitmap reference will be closed immediately after this method is called. Clone the reference if you need to hold on to the bitmap and close once no longer needed.
| bitmapReference | the bitmap reference or null if not a bitmap-based image |
+Generated by Doclava. +