SubjectAPI

interface SubjectAPI<T> : FlowCollector<T> , Flow<T>

Base interface for suspendable push signals emit, emitError and complete.

Functions

collect
Link copied to clipboard
abstract suspend fun collect(collector: FlowCollector<T>)
collectorCount
Link copied to clipboard
abstract fun collectorCount(): Int
Returns the number of collectors waiting for data.
complete
Link copied to clipboard
abstract suspend fun complete()
Indicate no further items will be produced.
emit
Link copied to clipboard
abstract suspend fun emit(value: T)
emitError
Link copied to clipboard
abstract suspend fun emitError(ex: Throwable)
Signal an Throwable to the collector.
hasCollectors
Link copied to clipboard
abstract fun hasCollectors(): Boolean
Returns true if this subject has collectors waiting for data.

Inheritors

BehaviorSubject
Link copied to clipboard
MulticastSubject
Link copied to clipboard
PublishSubject
Link copied to clipboard
ReplaySubject
Link copied to clipboard
UnicastSubject
Link copied to clipboard
UnicastWorkSubject
Link copied to clipboard