PublisherWorker

abstract class PublisherWorker<out OutputT : Any> : Worker<OutputT>

An convenience implementation of Worker that is expressed in terms of Reactive Streams' Publisher instead of Flow.

If you're using RxJava, Flowable is a Publisher.

Subclassing this is equivalent to just implementing Worker.run directly and calling asFlow on your Publisher.

Constructors

PublisherWorker
Link copied to clipboard
fun PublisherWorker()

Functions

doesSameWorkAs
Link copied to clipboard
open fun doesSameWorkAs(otherWorker: Worker<*>): Boolean
run
Link copied to clipboard
override fun run(): Flow<OutputT>
runPublisher
Link copied to clipboard
abstract fun runPublisher(): Publisher<out OutputT>
Returns a Flowable to execute the work represented by this worker.