public class

ForwardingControllerListener

extends Object
implements ControllerListener<INFO>
java.lang.Object
   ↳ com.facebook.drawee.controller.ForwardingControllerListener<INFO>

Class Overview

Listener that forwards controller events to multiple listeners.

Summary

Public Constructors
ForwardingControllerListener()
Public Methods
synchronized void addListener(ControllerListener<? super INFO> listener)
synchronized void clearListeners()
static <INFO> ForwardingControllerListener<INFO> create()
static <INFO> ForwardingControllerListener<INFO> of(ControllerListener<? super INFO> listener1, ControllerListener<? super INFO> listener2)
static <INFO> ForwardingControllerListener<INFO> of(ControllerListener<? super INFO> listener)
synchronized void onFailure(String id, Throwable throwable)
Called after the fetch of the final image failed.
synchronized void onFinalImageSet(String id, INFO imageInfo, Animatable animatable)
Called after the final image has been set.
void onIntermediateImageFailed(String id, Throwable throwable)
Called after the fetch of the intermediate image failed.
void onIntermediateImageSet(String id, INFO imageInfo)
Called after any intermediate image has been set.
synchronized void onRelease(String id)
Called after the controller released the fetched image.
synchronized void onSubmit(String id, Object callerContext)
Called before the image request is submitted.
synchronized void removeListener(ControllerListener<? super INFO> listener)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.drawee.controller.ControllerListener

Public Constructors

public ForwardingControllerListener ()

Public Methods

public synchronized void addListener (ControllerListener<? super INFO> listener)

public synchronized void clearListeners ()

public static ForwardingControllerListener<INFO> create ()

public static ForwardingControllerListener<INFO> of (ControllerListener<? super INFO> listener1, ControllerListener<? super INFO> listener2)

public static ForwardingControllerListener<INFO> of (ControllerListener<? super INFO> listener)

public synchronized void onFailure (String id, Throwable throwable)

Called after the fetch of the final image failed.

Parameters
id controller id
throwable failure cause

public synchronized void onFinalImageSet (String id, INFO imageInfo, Animatable animatable)

Called after the final image has been set.

Parameters
id controller id
imageInfo image info

public void onIntermediateImageFailed (String id, Throwable throwable)

Called after the fetch of the intermediate image failed.

Parameters
id controller id
throwable failure cause

public void onIntermediateImageSet (String id, INFO imageInfo)

Called after any intermediate image has been set.

Parameters
id controller id
imageInfo image info

public synchronized void onRelease (String id)

Called after the controller released the fetched image.

IMPORTANT: It is not safe to reuse the controller from within this callback!

Parameters
id controller id

public synchronized void onSubmit (String id, Object callerContext)

Called before the image request is submitted.

IMPORTANT: It is not safe to reuse the controller from within this callback!

Parameters
id controller id
callerContext caller context

public synchronized void removeListener (ControllerListener<? super INFO> listener)