public class

ForwardingRequestListener2

extends Object
implements RequestListener2
java.lang.Object
   ↳ com.facebook.imagepipeline.listener.ForwardingRequestListener2

Summary

Public Constructors
ForwardingRequestListener2(Set<RequestListener2> requestListeners)
ForwardingRequestListener2(RequestListener2... requestListeners)
Public Methods
void addRequestListener(RequestListener2 requestListener)
void onProducerEvent(ProducerContext producerContext, String producerName, String producerEventName)
Called whenever an important producer-specific event occurs.
void onProducerFinishWithCancellation(ProducerContext producerContext, String producerName, Map<String, String> extraMap)
Called once when producer finishes due to cancellation.
void onProducerFinishWithFailure(ProducerContext producerContext, String producerName, Throwable t, Map<String, String> extraMap)
Called when producer finishes processing current unit of work due to an error.
void onProducerFinishWithSuccess(ProducerContext producerContext, String producerName, Map<String, String> extraMap)
Called when a producer successfully finishes processing current unit of work.
void onProducerStart(ProducerContext producerContext, String producerName)
Called whenever a producer starts processing unit of work.
void onRequestCancellation(ProducerContext producerContext)
Called after the request is cancelled.
void onRequestFailure(ProducerContext producerContext, Throwable throwable)
Called after failure to complete the request (some producer failed).
void onRequestStart(ProducerContext producerContext)
Called when request is about to be submitted to the Orchestrator's executor queue.
void onRequestSuccess(ProducerContext producerContext)
Called after successful completion of the request (all producers completed successfully).
void onUltimateProducerReached(ProducerContext producerContext, String producerName, boolean successful)
Called when the producer which can create the final result for a given request has completed.
boolean requiresExtraMap(ProducerContext producerContext, String producerName)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.imagepipeline.listener.RequestListener2
From interface com.facebook.imagepipeline.producers.ProducerListener2

Public Constructors

public ForwardingRequestListener2 (Set<RequestListener2> requestListeners)

public ForwardingRequestListener2 (RequestListener2... requestListeners)

Public Methods

public void addRequestListener (RequestListener2 requestListener)

public void onProducerEvent (ProducerContext producerContext, String producerName, String producerEventName)

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.

public void onProducerFinishWithCancellation (ProducerContext producerContext, String producerName, Map<String, String> extraMap)

Called once when producer finishes due to cancellation.

Parameters
extraMap Additional parameters about the producer. This map is immutable and will throw an exception if attempts are made to modify it.

public void onProducerFinishWithFailure (ProducerContext producerContext, String producerName, Throwable t, Map<String, String> extraMap)

Called when producer finishes processing current unit of work due to an error.

Parameters
extraMap Additional parameters about the producer. This map is immutable and will throw an exception if attempts are made to modify it.

public void onProducerFinishWithSuccess (ProducerContext producerContext, String producerName, Map<String, String> extraMap)

Called when a producer successfully finishes processing current unit of work.

Parameters
extraMap Additional parameters about the producer. This map is immutable and will throw an exception if attempts are made to modify it.

public void onProducerStart (ProducerContext producerContext, String producerName)

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.

public void onRequestCancellation (ProducerContext producerContext)

Called after the request is cancelled.

Parameters
producerContext the producer context for the image

public void onRequestFailure (ProducerContext producerContext, Throwable throwable)

Called after failure to complete the request (some producer failed).

Parameters
producerContext the producer context for the image
throwable cause of failure

public void onRequestStart (ProducerContext producerContext)

Called when request is about to be submitted to the Orchestrator's executor queue.

Parameters
producerContext the producer context for the image

public void onRequestSuccess (ProducerContext producerContext)

Called after successful completion of the request (all producers completed successfully).

Parameters
producerContext the producer context for the image

public void onUltimateProducerReached (ProducerContext producerContext, String producerName, boolean successful)

Called when the producer which can create the final result for a given request has completed.

This can be used to determine which producer was best able to satisfy the request.

public boolean requiresExtraMap (ProducerContext producerContext, String producerName)