T
- the value type to emitpublic interface Emitter<T> extends Observer<T>
The onNext, onError and onCompleted methods should be called in a sequential manner, just like the Observer's methods. The other methods are thread-safe.
Modifier and Type | Interface and Description |
---|---|
static class |
Emitter.BackpressureMode
Options to handle backpressure in the emitter.
|
Modifier and Type | Method and Description |
---|---|
long |
requested()
The current outstanding request amount.
|
void |
setCancellation(Cancellable c)
Sets a Cancellable on this emitter; any previous Subscription
or Cancellation will be unsubscribed/cancelled.
|
void |
setSubscription(Subscription s)
Sets a Subscription on this emitter; any previous Subscription
or Cancellation will be unsubscribed/cancelled.
|
onCompleted, onError, onNext
void setSubscription(Subscription s)
s
- the subscription, null is allowedvoid setCancellation(Cancellable c)
c
- the cancellable resource, null is allowedlong requested()
This method it thread-safe.