src/main/java/io/reactivex/Flowable.java
@BackpressureSupport(BackpressureKind.SPECIAL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final void subscribe(FlowableSubscriber<? super T> s) {
        ObjectHelper.requireNonNull(s, "s is null");
        try {
            Subscriber<? super T> z = RxJavaPlugins.onSubscribe(this, s);

            ObjectHelper.requireNonNull(z, "The RxJavaPlugins.onSubscribe hook returned a null FlowableSubscriber. Please check the handler provided to RxJavaPlugins.setOnFlowableSubscribe for invalid null returns. Further reading: https://github.com/ReactiveX/RxJava/wiki/Plugins");

            subscribeActual(z);
        } catch (NullPointerException e) { // NOPMD
            throw e;
        } catch (Throwable e) {
            Exceptions.throwIfFatal(e);
            // can't call onError because no way to know if a Subscription has been set or not
            // can't call onSubscribe because the call might have set a Subscription already
            RxJavaPlugins.onError(e);

            NullPointerException npe = new NullPointerException("Actually not, but can't throw other exceptions due to RS");
            npe.initCause(e);
            throw npe;
        }
    }
@BackpressureSupport(BackpressureKind.SPECIAL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final void subscribe(FlowableSubscriber<? super T> s) {
        ObjectHelper.requireNonNull(s, "s is null");
        try {
            Subscriber<? super T> z = RxJavaPlugins.onSubscribe(this, s);

            ObjectHelper.requireNonNull(z, "The RxJavaPlugins.onSubscribe hook returned a null FlowableSubscriber. Please check the handler provided to RxJavaPlugins.setOnFlowableSubscribe for invalid null returns. Further reading: https://github.com/ReactiveX/RxJava/wiki/Plugins");

            subscribeActual(z);
        } catch (NullPointerException e) { // NOPMD
            throw e;
        } catch (Throwable e) {
            Exceptions.throwIfFatal(e);
            // can't call onError because no way to know if a Subscription has been set or not
            // can't call onSubscribe because the call might have set a Subscription already
            RxJavaPlugins.onError(e);

            NullPointerException npe = new NullPointerException("Actually not, but can't throw other exceptions due to RS");
            npe.initCause(e);
            throw npe;
        }
    }
@ BackpressureSupport ( BackpressureKind . SPECIAL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final void subscribe ( FlowableSubscriber < ? super T > s ) { ObjectHelper . requireNonNull ( s , "s is null" ) ; try { Subscriber < ? super T > z = RxJavaPlugins . onSubscribe ( this , s ) ; ObjectHelper . requireNonNull ( z , "The RxJavaPlugins.onSubscribe hook returned a null FlowableSubscriber. Please check the handler provided to RxJavaPlugins.setOnFlowableSubscribe for invalid null returns. Further reading: https://github.com/ReactiveX/RxJava/wiki/Plugins" ) ; subscribeActual ( z ) ; } catch ( NullPointerException e ) { // NOPMD throw e ; } catch ( Throwable e ) { Exceptions . throwIfFatal ( e ) ; // can't call onError because no way to know if a Subscription has been set or not // can't call onSubscribe because the call might have set a Subscription already RxJavaPlugins . onError ( e ) ; NullPointerException npe = new NullPointerException ( "Actually not, but can't throw other exceptions due to RS" ) ; npe . initCause ( e ) ; throw npe ; } }
Establish a connection between this Flowable and the given FlowableSubscriber and
start streaming events based on the demand of the FlowableSubscriber.
<p>
This is a "factory method" and can be called multiple times, each time starting a new {@link Subscription}.
<p>
Each {@link Subscription} will work for only a single {@link FlowableSubscriber}.
<p>
If the same {@link FlowableSubscriber} instance is subscribed to multiple {@link Flowable}s and/or the
same {@link Flowable} multiple times, it must ensure the serialization over its {@code onXXX}
methods manually.
<p>
If the {@link Flowable} rejects the subscription attempt or otherwise fails it will signal
the error via {@link FlowableSubscriber#onError(Throwable)}.
<p>
This subscribe method relaxes the following Reactive-Streams rules:
<ul>
<li>§1.3: onNext should not be called concurrently until onSubscribe returns.
<b>FlowableSubscriber.onSubscribe should make sure a sync or async call triggered by request() is safe.</b></li>
<li>§2.3: onError or onComplete must not call cancel.
<b>Calling request() or cancel() is NOP at this point.</b></li>
<li>§2.12: onSubscribe must be called at most once on the same instance.
<b>FlowableSubscriber reuse is not checked and if happens, it is the responsibility of
the FlowableSubscriber to ensure proper serialization of its onXXX methods.</b></li>
<li>§3.9: negative requests should emit an onError(IllegalArgumentException).
<b>Non-positive requests signal via RxJavaPlugins.onError and the stream is not affected.</b></li>
</ul>
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The backpressure behavior/expectation is determined by the supplied {@code FlowableSubscriber}.</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code subscribe} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>
<p>History: 2.0.7 - experimental; 2.1 - beta
@param s the FlowableSubscriber that will consume signals from this Flowable
@since 2.2
Establish a connection between this Flowable and the given FlowableSubscriber and start streaming events based on the demand of the FlowableSubscriber . <p > This is a factory method and can be called multiple times each time starting a new {