Documentation / dataflow-async / com.femastudios.dataflow.async.util / com.femastudios.dataflow.listen.LifecycleOwner
Go to reference

Extensions for com.femastudios.dataflow.listen.LifecycleOwner

async

Same as calling LifecycleOwner.deferred with DataflowThreadUtils.DATAFLOW_EXECUTOR as executor

fun LifecycleOwner.async(): LifecycleOwner

listen

Starts listening to the given Attribute.

fun <T> LifecycleOwner.listen(attribute: Attribute<T>, callback: (AttributeData<T>) -> Unit): ListenerHolder<AttributeData<T>>
fun <T> LifecycleOwner.listen(attribute: Attribute<T>, callback: Consumer<AttributeData<T>>): ListenerHolder<AttributeData<T>>
fun <T> LifecycleOwner.listen(attribute: Attribute<T>, callImmediately: Boolean, callback: (AttributeData<T>) -> Unit): ListenerHolder<AttributeData<T>>
fun <T> LifecycleOwner.listen(attribute: Attribute<T>, callImmediately: Boolean, callback: Consumer<AttributeData<T>>): ListenerHolder<AttributeData<T>>
fun <T> LifecycleOwner.listen(attribute: Attribute<T>, key: Any, callback: (AttributeData<T>) -> Unit): ListenerHolder<AttributeData<T>>
fun <T> LifecycleOwner.listen(attribute: Attribute<T>, key: Any, callback: Consumer<AttributeData<T>>): ListenerHolder<AttributeData<T>>
fun <T> LifecycleOwner.listen(attribute: Attribute<T>, key: Any, callImmediately: Boolean, callback: (AttributeData<T>) -> Unit): ListenerHolder<AttributeData<T>>
fun <T> LifecycleOwner.listen(attribute: Attribute<T>, key: Any, callImmediately: Boolean, callback: Consumer<AttributeData<T>>): ListenerHolder<AttributeData<T>>