T - the value type to emitpublic interface ObservableEmitter<T>
extends io.reactivex.common.Emitter<T>
Observer that allows associating
a resource with it.
The onNext, onError and onComplete methods should be called
in a sequential manner, just like the Observer's methods.
Use serialize() if you want to ensure this.
The other methods are thread-safe.
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDisposed()
Returns true if the downstream disposed the sequence.
|
ObservableEmitter<T> |
serialize()
Ensures that calls to onNext, onError and onComplete are properly serialized.
|
void |
setCancellable(io.reactivex.common.functions.Cancellable c)
Sets a Cancellable on this emitter; any previous Disposable
or Cancellation will be unsubscribed/cancelled.
|
void |
setDisposable(io.reactivex.common.Disposable d)
Sets a Disposable on this emitter; any previous Disposable
or Cancellation will be unsubscribed/cancelled.
|
void setDisposable(@Nullable
io.reactivex.common.Disposable d)
d - the disposable, null is allowedvoid setCancellable(@Nullable
io.reactivex.common.functions.Cancellable c)
c - the cancellable resource, null is allowedboolean isDisposed()
@NonNull ObservableEmitter<T> serialize()