SuspendingInteractor

abstract class SuspendingInteractor<in P : InteractorParams, out R>

An interactor (use case in Clean Architecture) represents an execution unit of asynchronous work. A SuspendingInteractor returns a single response through a suspend function.

Work will be executed on thread as specified by the dispatcher of the interactor.

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun execute(params: P): R

Execute the the interactor.

Properties

Link copied to clipboard
abstract val dispatcher: CoroutineDispatcher

The coroutine context this interactor should execute on.