java.lang.Object | |||
↳ | com.facebook.datasource.AbstractDataSource<T> | ||
↳ | com.facebook.imagepipeline.datasource.AbstractProducerToDataSourceAdapter<T> | ||
↳ | com.facebook.imagepipeline.datasource.CloseableProducerToDataSourceAdapter<T> |
DataSource
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static <T> DataSource<CloseableReference<T>> | create(Producer<CloseableReference<T>> producer, SettableProducerContext settableProducerContext, RequestListener2 listener) | ||||||||||
CloseableReference<T> |
getResult()
The most recent result of the asynchronous computation.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
closeResult(CloseableReference<T> result)
Subclasses should override this method to close the result that is not needed anymore.
| ||||||||||
void | onNewResultImpl(CloseableReference<T> result, int status, ProducerContext producerContext) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.facebook.imagepipeline.datasource.AbstractProducerToDataSourceAdapter
| |||||||||||
From class
com.facebook.datasource.AbstractDataSource
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.facebook.datasource.DataSource
| |||||||||||
From interface
com.facebook.imagepipeline.request.HasImageRequest
|
The most recent result of the asynchronous computation.
The caller gains ownership of the object and is responsible for releasing it. Note that subsequent calls to getResult might give different results. Later results should be considered to be of higher quality.
This method will return null in the following cases:
hasResult
returns false).
Subclasses should override this method to close the result that is not needed anymore.
This method is called in two cases: 1. to clear the result when data source gets closed 2. to clear the previous result when a new result is set