io.reactivex.FlowableEmitter<T> |
Abstraction over a Reactive Streams org.reactivestreams.Subscriber that allows associating a resource with it and exposes the current number of downstream requested amount.
The onNext, onError and onComplete methods should be called
in a sequential manner, just like the Subscriber's methods.
Use serialize()
if you want to ensure this.
The other methods are thread-safe.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
isCancelled()
Returns true if the downstream cancelled the sequence.
| ||||||||||
abstract long |
requested()
The current outstanding request amount.
| ||||||||||
abstract FlowableEmitter<T> |
serialize()
Ensures that calls to onNext, onError and onComplete are properly serialized.
| ||||||||||
abstract void |
setCancellable(Cancellable c)
Sets a Cancellable on this emitter; any previous Disposable
or Cancellation will be disposed/cancelled.
| ||||||||||
abstract void |
setDisposable(Disposable s)
Sets a Disposable on this emitter; any previous Disposable
or Cancellation will be disposed/cancelled.
| ||||||||||
abstract boolean |
tryOnError(Throwable t)
Attempts to emit the specified
Throwable error if the downstream
hasn't cancelled the sequence or is otherwise terminated, returning false
if the emission is not allowed to happen due to lifecycle restrictions. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns true if the downstream cancelled the sequence.
This method is thread-safe.
The current outstanding request amount.
This method is thread-safe.
Ensures that calls to onNext, onError and onComplete are properly serialized.
Sets a Cancellable on this emitter; any previous Disposable or Cancellation will be disposed/cancelled.
c | the cancellable resource, null is allowed |
---|
Sets a Disposable on this emitter; any previous Disposable or Cancellation will be disposed/cancelled.
s | the disposable, null is allowed |
---|
Attempts to emit the specified Throwable
error if the downstream
hasn't cancelled the sequence or is otherwise terminated, returning false
if the emission is not allowed to happen due to lifecycle restrictions.
Unlike onError(Throwable)
, the RxJavaPlugins.onError
is not called
if the error could not be delivered.
t | the throwable error to signal if possible |
---|