14
14
package io .reactivex .observables ;
15
15
16
16
import io .reactivex .annotations .NonNull ;
17
- import org .reactivestreams .Subscriber ;
18
17
19
18
import io .reactivex .*;
20
19
import io .reactivex .disposables .Disposable ;
25
24
import io .reactivex .plugins .RxJavaPlugins ;
26
25
27
26
/**
28
- * A {@code ConnectableObservable} resembles an ordinary {@link Flowable }, except that it does not begin
27
+ * A {@code ConnectableObservable} resembles an ordinary {@link Observable }, except that it does not begin
29
28
* emitting items when it is subscribed to, but only when its {@link #connect} method is called. In this way you
30
- * can wait for all intended {@link Subscriber }s to {@link Flowable #subscribe} to the {@code Observable}
29
+ * can wait for all intended {@link Observer }s to {@link Observable #subscribe} to the {@code Observable}
31
30
* before the {@code Observable} begins emitting items.
32
31
* <p>
33
32
* <img width="640" height="510" src="https://github.com/ReactiveX/RxJava/wiki/images/rx-operators/publishConnect.png" alt="">
@@ -41,7 +40,7 @@ public abstract class ConnectableObservable<T> extends Observable<T> {
41
40
42
41
/**
43
42
* Instructs the {@code ConnectableObservable} to begin emitting the items from its underlying
44
- * {@link Flowable } to its {@link Subscriber }s.
43
+ * {@link Observable } to its {@link Observer }s.
45
44
*
46
45
* @param connection
47
46
* the action that receives the connection subscription before the subscription to source happens
@@ -52,7 +51,7 @@ public abstract class ConnectableObservable<T> extends Observable<T> {
52
51
53
52
/**
54
53
* Instructs the {@code ConnectableObservable} to begin emitting the items from its underlying
55
- * {@link Flowable } to its {@link Subscriber }s.
54
+ * {@link Observable } to its {@link Observer }s.
56
55
* <p>
57
56
* To disconnect from a synchronous source, use the {@link #connect(Consumer)} method.
58
57
*
@@ -79,18 +78,18 @@ public Observable<T> refCount() {
79
78
80
79
/**
81
80
* Returns an Observable that automatically connects to this ConnectableObservable
82
- * when the first Subscriber subscribes.
81
+ * when the first Observer subscribes.
83
82
*
84
83
* @return an Observable that automatically connects to this ConnectableObservable
85
- * when the first Subscriber subscribes
84
+ * when the first Observer subscribes
86
85
*/
87
86
@ NonNull
88
87
public Observable <T > autoConnect () {
89
88
return autoConnect (1 );
90
89
}
91
90
/**
92
91
* Returns an Observable that automatically connects to this ConnectableObservable
93
- * when the specified number of Subscribers subscribe to it.
92
+ * when the specified number of Observers subscribe to it.
94
93
*
95
94
* @param numberOfSubscribers the number of subscribers to await before calling connect
96
95
* on the ConnectableObservable. A non-positive value indicates
0 commit comments