TerminatingResultHandler

abstract class TerminatingResultHandler<Input, State, Output>(initialState: State) : StatefulResultHandler<Input, State, Output, Unit>

A result handler with a method that notifies when all data has been processed.

Constructors

Link copied to clipboard
fun <State> TerminatingResultHandler(initialState: State)

Functions

Link copied to clipboard
abstract suspend fun onAllDataProcessed()

All data has been processed and termination was reached.

Link copied to clipboard
abstract suspend fun onResult(result: Output, data: Input)
Link copied to clipboard
abstract suspend fun onTerminatedEarly()

Not all data was processed before termination.

Properties

Link copied to clipboard
val state: State

The state of the result handler. This can be read, but not updated by analyzers.