T
- the value type emittedpublic interface Emitter<T>
Note that the onNext(T)
, onError(java.lang.Throwable)
and
onComplete()
methods provided to the function via the Emitter
instance should be called synchronously,
never concurrently. Calling them from multiple threads is not supported and leads to an
undefined behavior.
Modifier and Type | Method and Description |
---|---|
void |
onComplete()
Signal a completion.
|
void |
onError(@NonNull Throwable error)
Signal a
Throwable exception. |
void |
onNext(T value)
Signal a normal value.
|
void onNext(@NonNull T value)
value
- the value to signal, not null
void onError(@NonNull @NonNull Throwable error)
Throwable
exception.error
- the Throwable
to signal, not null
void onComplete()