LazyForwardingEventListener

class LazyForwardingEventListener(lazyEventListener: () -> EventListener) : EventListener

Forwards events to the EventListener provided by lazyEventListener which is evaluated lazily, when the first comes in.

Constructors

LazyForwardingEventListener
Link copied to clipboard
fun LazyForwardingEventListener(lazyEventListener: () -> EventListener)

Functions

onEvent
Link copied to clipboard
open override fun onEvent(event: EventListener.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.