-
- All Implemented Interfaces:
-
leakcanary.EventListener
public final class LazyForwardingEventListener implements EventListener
Forwards events to the EventListener provided by lazyEventListener which is evaluated lazily, when the first comes in.
-
-
Constructor Summary
Constructors Constructor Description LazyForwardingEventListener(Function0<EventListener> lazyEventListener)
-
Method Summary
Modifier and Type Method Description UnitonEvent(EventListener.Event event)onEvent is always called from the thread the events are emitted from, which is documented for each event. -
-
Constructor Detail
-
LazyForwardingEventListener
LazyForwardingEventListener(Function0<EventListener> lazyEventListener)
-
-
Method Detail
-
onEvent
Unit onEvent(EventListener.Event event)
onEvent is always called from the thread the events are emitted from, which is documented for each event. This enables you to potentially block a chain of events, waiting for some pre work to be done.
-
-
-
-