/** * Instructs the {@code ConnectableObservable} to begin emitting the items from its underlying * {@link Observable} to its {@link Observer}s. * <p> * To disconnect from a synchronous source, use the {@link #connect(Consumer)} method. * * @return the subscription representing the connection * @see <a href="http://reactivex.io/documentation/operators/connect.html">ReactiveX documentation: Connect</a> */ public final Disposable connect() { ConnectConsumer cc = new ConnectConsumer(); connect(cc); return cc.disposable; }
/** * Instructs the {@code ConnectableObservable} to begin emitting the items from its underlying * {@link Flowable} to its {@link Subscriber}s. * <p> * To disconnect from a synchronous source, use the {@link #connect(io.reactivex.common.functions.Consumer)} method. * * @return the subscription representing the connection * @see <a href="http://reactivex.io/documentation/operators/connect.html">ReactiveX documentation: Connect</a> */ public final Disposable connect() { ConnectConsumer cc = new ConnectConsumer(); connect(cc); return cc.disposable; }
/** * Instructs the {@code ConnectableObservable} to begin emitting the items from its underlying * {@link Observable} to its {@link Observer}s. * <p> * To disconnect from a synchronous source, use the {@link #connect(Consumer)} method. * * @return the subscription representing the connection * @see <a href="http://reactivex.io/documentation/operators/connect.html">ReactiveX documentation: Connect</a> */ public final Disposable connect() { ConnectConsumer cc = new ConnectConsumer(); connect(cc); return cc.disposable; }