Package 

Class ForwardingRequestListener

  • All Implemented Interfaces:
    com.facebook.imagepipeline.listener.RequestListener , com.facebook.imagepipeline.producers.ProducerListener

    
    public class ForwardingRequestListener
     implements RequestListener
                        
    • Constructor Detail

      • ForwardingRequestListener

        ForwardingRequestListener(Set<RequestListener> requestListeners)
    • Method Detail

      • onRequestStart

         void onRequestStart(ImageRequest request, Object callerContext, String requestId, boolean isPrefetch)

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

        Parameters:
        request - which triggered the event
        callerContext - context of the caller of the request
        requestId - unique id generated automatically for each request submission
        isPrefetch - whether the request is a prefetch or not
      • onProducerStart

         void onProducerStart(String requestId, String producerName)

        Called whenever a producer starts processing unit of work. This method might be called multipletimes, but between any two consecutive calls to onProducerStart onProducerFinishWithSuccesswill be called exactly once.

      • onProducerEvent

         void onProducerEvent(String requestId, String producerName, String producerEventName)

        Called whenever an important producer-specific event occurs. This may only be called ifonProducerStart has been called, but corresponding onProducerFinishWith* method has not beencalled yet.

      • onUltimateProducerReached

         void onUltimateProducerReached(String requestId, 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.

      • onRequestSuccess

         void onRequestSuccess(ImageRequest request, String requestId, boolean isPrefetch)

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

        Parameters:
        request - which triggered the event
        requestId - unique id generated automatically for each request submission
        isPrefetch - whether the request is a prefetch or not
      • onRequestFailure

         void onRequestFailure(ImageRequest request, String requestId, Throwable throwable, boolean isPrefetch)

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

        Parameters:
        request - which triggered the event
        requestId - unique id generated automatically for each request submission
        throwable - cause of failure
        isPrefetch - whether the request is a prefetch or not
      • onRequestCancellation

         void onRequestCancellation(String requestId)

        Called after the request is cancelled.

        Parameters:
        requestId - unique id generated automatically for each request submission