public abstract class

AbstractProducerToDataSourceAdapter

extends AbstractDataSource<T>
java.lang.Object
   ↳ com.facebook.datasource.AbstractDataSource<T>
     ↳ com.facebook.imagepipeline.datasource.AbstractProducerToDataSourceAdapter<T>
Known Direct Subclasses

Class Overview

DataSource backed by a Producer

Summary

Protected Constructors
AbstractProducerToDataSourceAdapter(Producer<T> producer, SettableProducerContext settableProducerContext, RequestListener requestListener)
Public Methods
boolean close()
Cancels the ongoing request and releases all associated resources.
Protected Methods
void onNewResultImpl(T result, boolean isLast)
[Expand]
Inherited Methods
From class com.facebook.datasource.AbstractDataSource
From class java.lang.Object
From interface com.facebook.datasource.DataSource

Protected Constructors

protected AbstractProducerToDataSourceAdapter (Producer<T> producer, SettableProducerContext settableProducerContext, RequestListener 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

Protected Methods

protected void onNewResultImpl (T result, boolean isLast)