Interactor

abstract class Interactor<in P>

Base interactor class to be used for work without a specific result. Examples:

  • updating the local database

  • perform an api call and update the database (without having to know the actual result)

returns: InvokeStatus in a flow on invoke to indicate the status of the work

Constructors

Interactor
Link copied to clipboard
fun Interactor()

Types

Companion
Link copied to clipboard
object Companion

Functions

executeSync
Link copied to clipboard
suspend fun executeSync(params: P)
Executes the work synchronously without knowing the status
invoke
Link copied to clipboard
operator fun invoke(params: P, timeoutMs: Long = defaultTimeoutMs): Flow<InvokeStatus>

Extensions

invoke
Link copied to clipboard
operator fun Interactor<Unit>.invoke(): Flow<InvokeStatus>