com.facebook.imagepipeline.producers.ProducerListener |
![]() |
Instrumentation for Producers.
Implementation of a producer should call these methods when appropriate to notify other components interested in execution progress.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
onProducerEvent(String requestId, String producerName, String eventName)
Called whenever an important producer-specific event occurs.
| ||||||||||
abstract void |
onProducerFinishWithCancellation(String requestId, String producerName, Map<String, String> extraMap)
Called once when producer finishes due to cancellation.
| ||||||||||
abstract void |
onProducerFinishWithFailure(String requestId, String producerName, Throwable t, Map<String, String> extraMap)
Called when producer finishes processing current unit of work due to an error.
| ||||||||||
abstract void |
onProducerFinishWithSuccess(String requestId, String producerName, Map<String, String> extraMap)
Called when a producer successfully finishes processing current unit of work.
| ||||||||||
abstract void |
onProducerStart(String requestId, String producerName)
Called whenever a producer starts processing unit of work.
| ||||||||||
abstract boolean | requiresExtraMap(String requestId) |
Called whenever an important producer-specific event occurs. This may only be called if onProducerStart has been called, but corresponding onProducerFinishWith* method has not been called yet.
Called once when producer finishes due to cancellation.
extraMap | Additional parameters about the producer. This map is immutable and will throw an exception if attempts are made to modify it. |
---|
Called when producer finishes processing current unit of work due to an error.
extraMap | Additional parameters about the producer. This map is immutable and will throw an exception if attempts are made to modify it. |
---|
Called when a producer successfully finishes processing current unit of work.
extraMap | Additional parameters about the producer. This map is immutable and will throw an exception if attempts are made to modify it. |
---|
Called whenever a producer starts processing unit of work. This method might be called multiple times, but between any two consecutive calls to onProducerStart onProducerFinishWithSuccess will be called exactly once.