25
25
import io .reactivex .plugins .RxJavaPlugins ;
26
26
27
27
/**
28
- * A {@code ConnectableObservable } resembles an ordinary {@link Flowable}, except that it does not begin
28
+ * A {@code ConnectableFlowable } resembles an ordinary {@link Flowable}, except that it does not begin
29
29
* 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 }
31
- * before the {@code Observable } begins emitting items.
30
+ * can wait for all intended {@link Subscriber}s to {@link Flowable#subscribe} to the {@code Flowable }
31
+ * before the {@code Flowable } begins emitting items.
32
32
* <p>
33
33
* <img width="640" height="510" src="https://github.com/ReactiveX/RxJava/wiki/images/rx-operators/publishConnect.png" alt="">
34
34
*
35
35
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Connectable-Observable-Operators">RxJava Wiki:
36
36
* Connectable Observable Operators</a>
37
37
* @param <T>
38
- * the type of items emitted by the {@code ConnectableObservable }
38
+ * the type of items emitted by the {@code ConnectableFlowable }
39
39
*/
40
40
public abstract class ConnectableFlowable <T > extends Flowable <T > {
41
41
42
42
/**
43
- * Instructs the {@code ConnectableObservable } to begin emitting the items from its underlying
43
+ * Instructs the {@code ConnectableFlowable } to begin emitting the items from its underlying
44
44
* {@link Flowable} to its {@link Subscriber}s.
45
45
*
46
46
* @param connection
@@ -51,7 +51,7 @@ public abstract class ConnectableFlowable<T> extends Flowable<T> {
51
51
public abstract void connect (@ NonNull Consumer <? super Disposable > connection );
52
52
53
53
/**
54
- * Instructs the {@code ConnectableObservable } to begin emitting the items from its underlying
54
+ * Instructs the {@code ConnectableFlowable } to begin emitting the items from its underlying
55
55
* {@link Flowable} to its {@link Subscriber}s.
56
56
* <p>
57
57
* To disconnect from a synchronous source, use the {@link #connect(io.reactivex.functions.Consumer)} method.
@@ -66,8 +66,8 @@ public final Disposable connect() {
66
66
}
67
67
68
68
/**
69
- * Returns an {@code Observable } that stays connected to this {@code ConnectableObservable } as long as there
70
- * is at least one subscription to this {@code ConnectableObservable }.
69
+ * Returns a {@code Flowable } that stays connected to this {@code ConnectableFlowable } as long as there
70
+ * is at least one subscription to this {@code ConnectableFlowable }.
71
71
*
72
72
* @return a {@link Flowable}
73
73
* @see <a href="http://reactivex.io/documentation/operators/refcount.html">ReactiveX documentation: RefCount</a>
@@ -78,24 +78,24 @@ public Flowable<T> refCount() {
78
78
}
79
79
80
80
/**
81
- * Returns an Observable that automatically connects to this ConnectableObservable
81
+ * Returns a Flowable that automatically connects to this ConnectableFlowable
82
82
* when the first Subscriber subscribes.
83
83
*
84
- * @return an Observable that automatically connects to this ConnectableObservable
84
+ * @return a Flowable that automatically connects to this ConnectableFlowable
85
85
* when the first Subscriber subscribes
86
86
*/
87
87
@ NonNull
88
88
public Flowable <T > autoConnect () {
89
89
return autoConnect (1 );
90
90
}
91
91
/**
92
- * Returns an Observable that automatically connects to this ConnectableObservable
92
+ * Returns a Flowable that automatically connects to this ConnectableFlowable
93
93
* when the specified number of Subscribers subscribe to it.
94
94
*
95
95
* @param numberOfSubscribers the number of subscribers to await before calling connect
96
- * on the ConnectableObservable . A non-positive value indicates
96
+ * on the ConnectableFlowable . A non-positive value indicates
97
97
* an immediate connection.
98
- * @return an Observable that automatically connects to this ConnectableObservable
98
+ * @return a Flowable that automatically connects to this ConnectableFlowable
99
99
* when the specified number of Subscribers subscribe to it
100
100
*/
101
101
@ NonNull
@@ -104,16 +104,16 @@ public Flowable<T> autoConnect(int numberOfSubscribers) {
104
104
}
105
105
106
106
/**
107
- * Returns an Observable that automatically connects to this ConnectableObservable
107
+ * Returns a Flowable that automatically connects to this ConnectableFlowable
108
108
* when the specified number of Subscribers subscribe to it and calls the
109
109
* specified callback with the Subscription associated with the established connection.
110
110
*
111
111
* @param numberOfSubscribers the number of subscribers to await before calling connect
112
- * on the ConnectableObservable . A non-positive value indicates
112
+ * on the ConnectableFlowable . A non-positive value indicates
113
113
* an immediate connection.
114
114
* @param connection the callback Consumer that will receive the Subscription representing the
115
115
* established connection
116
- * @return an Observable that automatically connects to this ConnectableObservable
116
+ * @return a Flowable that automatically connects to this ConnectableFlowable
117
117
* when the specified number of Subscribers subscribe to it and calls the
118
118
* specified callback with the Subscription associated with the established connection
119
119
*/
0 commit comments