public abstract class

AbstractProducerToDataSourceAdapter

extends AbstractDataSource<T>
implements HasImageRequest
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, RequestListener2 requestListener)
Public Methods
boolean close()
Cancels the ongoing request and releases all associated resources.
ImageRequest getImageRequest()
Protected Methods
Map<String, Object> getExtras(ProducerContext producerContext)
void onNewResultImpl(T result, int status, ProducerContext producerContext)
[Expand]
Inherited Methods
From class com.facebook.datasource.AbstractDataSource
From class java.lang.Object
From interface com.facebook.datasource.DataSource
From interface com.facebook.imagepipeline.request.HasImageRequest

Protected Constructors

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

public ImageRequest getImageRequest ()

Protected Methods

protected Map<String, Object> getExtras (ProducerContext producerContext)

protected void onNewResultImpl (T result, int status, ProducerContext producerContext)