Skip to content

Commit 1fe60f5

Browse files
authored
3.x: JavaDocs: clarify create emitters are per consumer (#6535)
1 parent b71a1d9 commit 1fe60f5

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

src/main/java/io/reactivex/Completable.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ public static Completable concat(Publisher<? extends CompletableSource> sources,
292292
*
293293
* });
294294
* </code></pre>
295+
* <p>
296+
* Whenever a {@link CompletableObserver} subscribes to the returned {@code Completable}, the provided
297+
* {@link CompletableOnSubscribe} callback is invoked with a fresh instance of a {@link CompletableEmitter}
298+
* that will interact only with that specific {@code CompletableObserver}. If this {@code CompletableObserver}
299+
* disposes the flow (making {@link CompletableEmitter#isDisposed} return true),
300+
* other observers subscribed to the same returned {@code Completable} are not affected.
295301
* <dl>
296302
* <dt><b>Scheduler:</b></dt>
297303
* <dd>{@code create} does not operate by default on a particular {@link Scheduler}.</dd>

src/main/java/io/reactivex/Flowable.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,6 +1877,12 @@ public static <T> Flowable<T> concatEager(Iterable<? extends Publisher<? extends
18771877
* }, BackpressureStrategy.BUFFER);
18781878
* </code></pre>
18791879
* <p>
1880+
* Whenever a {@link Subscriber} subscribes to the returned {@code Flowable}, the provided
1881+
* {@link FlowableOnSubscribe} callback is invoked with a fresh instance of a {@link FlowableEmitter}
1882+
* that will interact only with that specific {@code Subscriber}. If this {@code Subscriber}
1883+
* cancels the flow (making {@link FlowableEmitter#isCancelled} return true),
1884+
* other observers subscribed to the same returned {@code Flowable} are not affected.
1885+
* <p>
18801886
* You should call the FlowableEmitter onNext, onError and onComplete methods in a serialized fashion. The
18811887
* rest of its methods are thread-safe.
18821888
* <dl>

src/main/java/io/reactivex/Maybe.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,12 @@ public static <T> Flowable<T> concatEager(Publisher<? extends MaybeSource<? exte
554554
*
555555
* });
556556
* </code></pre>
557+
* <p>
558+
* Whenever a {@link MaybeObserver} subscribes to the returned {@code Maybe}, the provided
559+
* {@link MaybeOnSubscribe} callback is invoked with a fresh instance of a {@link MaybeEmitter}
560+
* that will interact only with that specific {@code MaybeObserver}. If this {@code MaybeObserver}
561+
* disposes the flow (making {@link MaybeEmitter#isDisposed} return true),
562+
* other observers subscribed to the same returned {@code Maybe} are not affected.
557563
* <dl>
558564
* <dt><b>Scheduler:</b></dt>
559565
* <dd>{@code create} does not operate by default on a particular {@link Scheduler}.</dd>

src/main/java/io/reactivex/Observable.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,12 @@ public static <T> Observable<T> concatEager(Iterable<? extends ObservableSource<
16111611
* });
16121612
* </code></pre>
16131613
* <p>
1614+
* Whenever an {@link Observer} subscribes to the returned {@code Observable}, the provided
1615+
* {@link ObservableOnSubscribe} callback is invoked with a fresh instance of an {@link ObservableEmitter}
1616+
* that will interact only with that specific {@code Observer}. If this {@code Observer}
1617+
* disposes the flow (making {@link ObservableEmitter#isDisposed} return true),
1618+
* other observers subscribed to the same returned {@code Observable} are not affected.
1619+
* <p>
16141620
* <img width="640" height="200" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/create.png" alt="">
16151621
* <p>
16161622
* You should call the ObservableEmitter's onNext, onError and onComplete methods in a serialized fashion. The

src/main/java/io/reactivex/Single.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,12 @@ public static <T> Flowable<T> concatEager(Iterable<? extends SingleSource<? exte
501501
*
502502
* });
503503
* </code></pre>
504+
* <p>
505+
* Whenever a {@link SingleObserver} subscribes to the returned {@code Single}, the provided
506+
* {@link SingleOnSubscribe} callback is invoked with a fresh instance of a {@link SingleEmitter}
507+
* that will interact only with that specific {@code SingleObserver}. If this {@code SingleObserver}
508+
* disposes the flow (making {@link SingleEmitter#isDisposed} return true),
509+
* other observers subscribed to the same returned {@code Single} are not affected.
504510
* <dl>
505511
* <dt><b>Scheduler:</b></dt>
506512
* <dd>{@code create} does not operate by default on a particular {@link Scheduler}.</dd>

0 commit comments

Comments
 (0)