Package 

Interface ProducerContext

  • All Implemented Interfaces:
    com.facebook.fresco.middleware.HasExtraData

    
    public interface ProducerContext
     implements HasExtraData
                        

    Used to pass context information to producers.

    Object implementing this interface is passed to all producers participating in pipeline request {@see Producer#produceResults}. Its responsibility is to instruct producers which image should be fetched/decoded/resized/cached etc. This class also handles request cancellation.

    In order to be notified when cancellation is requested, a producer should use the runOnCancellationRequested method which takes an instance of Runnable and executes it when the pipeline client cancels the image request.