addChangeListener
expect fun addChangeListener(listener: MessageEndpointListenerChangeListener): ListenerToken(source)
Add a change listener.
Return
An opaque listener token object for removing the listener.
Parameters
listener
The listener to post changes.
See also
expect fun addChangeListener(context: CoroutineContext, listener: MessageEndpointListenerChangeSuspendListener): ListenerToken(source)
Add a change listener with a CoroutineContext that will be used to launch coroutines the listener will be called on. Coroutines will be launched in a CoroutineScope that is canceled when the listener is removed.
Return
An opaque listener token object for removing the listener.
Parameters
context
coroutine context in which the listener will run
listener
The listener to post changes.
See also
expect fun addChangeListener(scope: CoroutineScope, listener: MessageEndpointListenerChangeSuspendListener)(source)
Add a change listener with a CoroutineScope that will be used to launch coroutines the listener will be called on. The listener is removed when the scope is canceled.
Parameters
scope
coroutine scope in which the listener will run
listener
The listener to post changes.
actual fun addChangeListener(listener: MessageEndpointListenerChangeListener): ListenerToken(source)
actual fun addChangeListener(context: CoroutineContext, listener: MessageEndpointListenerChangeSuspendListener): ListenerToken(source)
actual fun addChangeListener(scope: CoroutineScope, listener: MessageEndpointListenerChangeSuspendListener)(source)
actual fun addChangeListener(listener: MessageEndpointListenerChangeListener): ListenerToken(source)
actual fun addChangeListener(context: CoroutineContext, listener: MessageEndpointListenerChangeSuspendListener): ListenerToken(source)
actual fun addChangeListener(scope: CoroutineScope, listener: MessageEndpointListenerChangeSuspendListener)(source)