See: Description
Class | Description |
---|---|
AsyncSubject<T> |
A Subject that emits the very last value followed by a completion event or the received error to Observers.
|
BehaviorSubject<T> |
Subject that emits the most recent item it has observed and all subsequent observed items to each subscribed
Observer . |
CompletableSubject |
Represents a hot Completable-like source and consumer of events similar to Subjects.
|
MaybeSubject<T> |
Represents a hot Maybe-like source and consumer of events similar to Subjects.
|
PublishSubject<T> |
A Subject that emits (multicasts) items to currently subscribed
Observer s and terminal events to current
or late Observer s. |
ReplaySubject<T> |
Replays events (in a configurable bounded or unbounded manner) to current and late
Observer s. |
SingleSubject<T> |
Represents a hot Single-like source and consumer of events similar to Subjects.
|
Subject<T> |
Represents an
Observer and an Observable at the same time, allowing
multicasting events from a single source to multiple child Observer s. |
UnicastSubject<T> |
A Subject that queues up events until a single
Observer subscribes to it, replays
those events to it until the Observer catches up and then switches to relaying events live to
this single Observer until this UnicastSubject terminates or the Observer unsubscribes. |
Available subject classes with their respective base classes and consumer interfaces:
Subject type | Base class | Consumer interface |
Subject
AsyncSubject
BehaviorSubject
PublishSubject
ReplaySubject
UnicastSubject
|
Observable |
Observer |
SingleSubject |
Single |
SingleObserver |
MaybeSubject |
Maybe |
MaybeObserver |
CompletableSubject |
Completable |
CompletableObserver |
The backpressure-aware variants of the Subject
class are called
Processor
s and reside in the io.reactivex.processors
package.
io.reactivex.rxjava3.processors