T
- the value type to emitpublic interface ObservableEmitter<T> extends 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(Cancellable c)
Sets a Cancellable on this emitter; any previous Disposable
or Cancellation will be unsubscribed/cancelled.
|
void |
setDisposable(Disposable d)
Sets a Disposable on this emitter; any previous Disposable
or Cancellation will be unsubscribed/cancelled.
|
onComplete, onError, onNext
void setDisposable(@Nullable Disposable d)
d
- the disposable, null is allowedvoid setCancellable(@Nullable Cancellable c)
c
- the cancellable resource, null is allowedboolean isDisposed()
@NonNull ObservableEmitter<T> serialize()