@@ -46,20 +46,34 @@ protected Subscriber() {
46
46
this (null , false );
47
47
}
48
48
49
+ /**
50
+ * Construct a Subscriber by using another Subscriber for backpressure and
51
+ * for holding the subscription list (when <code>this.add(sub)</code> is
52
+ * called this will in fact call <code>subscriber.add(sub)</code>).
53
+ *
54
+ * @param subscriber
55
+ * the other Subscriber
56
+ */
49
57
protected Subscriber (Subscriber <?> subscriber ) {
50
58
this (subscriber , true );
51
59
}
52
60
53
61
/**
54
- * Construct a Subscriber by using another Subscriber for backpressure and optionally sharing the
55
- * underlying subscriptions list.
62
+ * Construct a Subscriber by using another Subscriber for backpressure and
63
+ * optionally for holding the subscription list (if
64
+ * <code>shareSubscriptions</code> is <code>true</code> then when
65
+ * <code>this.add(sub)</code> is called this will in fact call
66
+ * <code>subscriber.add(sub)</code>).
56
67
* <p>
57
- * To retain the chaining of subscribers, add the created instance to {@code op} via {@link #add}.
68
+ * To retain the chaining of subscribers when setting
69
+ * <code>shareSubscriptions</code> to <code>false</code>, add the created
70
+ * instance to {@code subscriber} via {@link #add}.
58
71
*
59
72
* @param subscriber
60
73
* the other Subscriber
61
74
* @param shareSubscriptions
62
- * {@code true} to share the subscription list in {@code op} with this instance
75
+ * {@code true} to share the subscription list in {@code subscriber} with
76
+ * this instance
63
77
* @since 1.0.6
64
78
*/
65
79
protected Subscriber (Subscriber <?> subscriber , boolean shareSubscriptions ) {
@@ -158,9 +172,19 @@ private void addToRequested(long n) {
158
172
}
159
173
160
174
/**
161
- * @warn javadoc description missing
162
- * @warn param producer not described
175
+ * If other subscriber is set (by calling constructor
176
+ * {@link #Subscriber(Subscriber)} or
177
+ * {@link #Subscriber(Subscriber, boolean)}) then this method calls
178
+ * <code>setProducer</code> on the other subscriber. If the other subscriber
179
+ * is not set and no requests have been made to this subscriber then
180
+ * <code>p.request(Long.MAX_VALUE)</code> is called. If the other subscriber
181
+ * is not set and some requests have been made to this subscriber then
182
+ * <code>p.request(n)</code> is called where n is the accumulated requests
183
+ * to this subscriber.
184
+ *
163
185
* @param p
186
+ * producer to be used by this subscriber or the other subscriber
187
+ * (or recursively its other subscriber) to make requests from
164
188
*/
165
189
public void setProducer (Producer p ) {
166
190
long toRequest ;
0 commit comments