T - the value typepublic abstract class DefaultSubscriber<T> extends java.lang.Object implements FlowableSubscriber<T>
request(long), cancelling via
via cancel() (both synchronously) and calls onStart()
when the subscription happens.| Constructor and Description |
|---|
DefaultSubscriber() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cancel()
Cancels the upstream's Subscription.
|
protected void |
onStart()
Called once the subscription has been set on this observer; override this
to perform initialization or issue an initial request.
|
void |
onSubscribe(org.reactivestreams.Subscription s)
Implementors of this method should make sure everything that needs
to be visible in
Subscriber.onNext(Object) is established before
calling Subscription.request(long). |
protected void |
request(long n)
Requests from the upstream Subscription.
|
public final void onSubscribe(org.reactivestreams.Subscription s)
FlowableSubscriberSubscriber.onNext(Object) is established before
calling Subscription.request(long). In practice this means
no initialization should happen after the request() call and
additional behavior is thread safe in respect to onNext.
onSubscribe in interface FlowableSubscriber<T>onSubscribe in interface org.reactivestreams.Subscriber<T>protected final void request(long n)
n - the request amount, positiveprotected final void cancel()
protected void onStart()
The default implementation requests Long.MAX_VALUE.