| java.lang.Object | |
| ↳ | io.reactivex.subscribers.SafeSubscriber<T> |
Wraps another Subscriber and ensures all onXXX methods conform the protocol (except the requirement for serialized access).
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
SafeSubscriber(Subscriber<? super T> actual)
Constructs a SafeSubscriber by wrapping the given actual Subscriber.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void | cancel() | ||||||||||
| void | onComplete() | ||||||||||
| void | onError(Throwable t) | ||||||||||
| void | onNext(T t) | ||||||||||
| void |
onSubscribe(Subscription s)
Implementors of this method should make sure everything that needs
to be visible in
onNext(Object) is established before
calling request(long). | ||||||||||
| void | request(long n) | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
io.reactivex.FlowableSubscriber
| |||||||||||
From interface
org.reactivestreams.Subscriber
| |||||||||||
From interface
org.reactivestreams.Subscription
| |||||||||||
Constructs a SafeSubscriber by wrapping the given actual Subscriber.
| actual | the actual Subscriber to wrap, not null (not validated) |
|---|
Implementors of this method should make sure everything that needs
to be visible in onNext(Object) is established before
calling request(long). In practice this means
no initialization should happen after the request() call and
additional behavior is thread safe in respect to onNext.