//workflow/com.squareup.workflow1/LifecycleWorker
LifecycleWorker¶
[jvm] abstract class LifecycleWorker : Worker<Nothing>
Worker that performs some action when the worker is started and/or stopped.
A Worker is stopped when its parent Workflow finishes a render pass without running the worker, or when the parent workflow is itself torn down.
Constructors¶
LifecycleWorker | [jvm] fun LifecycleWorker() |
Functions¶
Name | Summary |
---|---|
doesSameWorkAs | [jvm] Content open override fun doesSameWorkAs(otherWorker: Worker<*>): Boolean More info Equates LifecycleWorkers that have the same concrete class. |
onStarted | [jvm] Content open fun onStarted() More info Called when this worker is started. |
onStopped | [jvm] Content open fun onStopped() More info Called when this worker has been torn down. |
run | [jvm] Content override fun run(): Flow<Nothing> More info Returns a Flow to execute the work represented by this worker. |