@@ -64,7 +64,7 @@ public static <T> Flow.Publisher<T> toFlow(
64
64
}
65
65
return new FlowPublisherFromReactive <T >(reactiveStreamsPublisher );
66
66
}
67
-
67
+
68
68
/**
69
69
* Converts a Flow Processor into a Reactive Streams Processor.
70
70
* @param <T> the input value type
@@ -117,7 +117,7 @@ public static <T, U> Flow.Processor<T, U> toFlow(
117
117
* @param reactiveStreamsSubscriber the Reactive Streams Subscriber instance to convert
118
118
* @return the equivalent Flow Subscriber
119
119
*/
120
- public static <T > Flow .Subscriber <T > toFlowSubscriber (org .reactivestreams .Subscriber <T > reactiveStreamsSubscriber ) {
120
+ public static <T > Flow .Subscriber <T > toFlow (org .reactivestreams .Subscriber <T > reactiveStreamsSubscriber ) {
121
121
if (reactiveStreamsSubscriber == null ) {
122
122
throw new NullPointerException ("reactiveStreamsSubscriber" );
123
123
}
@@ -130,7 +130,7 @@ public static <T> Flow.Subscriber<T> toFlowSubscriber(org.reactivestreams.Subscr
130
130
* @param flowSubscriber the Flow Subscriber instance to convert
131
131
* @return the equivalent Reactive Streams Subscriber
132
132
*/
133
- public static <T > org .reactivestreams .Subscriber <T > toReactiveStreamsSubscriber (Flow .Subscriber <T > flowSubscriber ) {
133
+ public static <T > org .reactivestreams .Subscriber <T > toReactiveStreams (Flow .Subscriber <T > flowSubscriber ) {
134
134
if (flowSubscriber == null ) {
135
135
throw new NullPointerException ("flowSubscriber" );
136
136
}
@@ -142,7 +142,7 @@ public static <T> org.reactivestreams.Subscriber<T> toReactiveStreamsSubscriber(
142
142
*/
143
143
static final class FlowToReactiveSubscription implements Flow .Subscription {
144
144
private final org .reactivestreams .Subscription reactiveStreams ;
145
-
145
+
146
146
public FlowToReactiveSubscription (org .reactivestreams .Subscription reactive ) {
147
147
this .reactiveStreams = reactive ;
148
148
}
@@ -156,15 +156,15 @@ public void request(long n) {
156
156
public void cancel () {
157
157
reactiveStreams .cancel ();
158
158
}
159
-
159
+
160
160
}
161
-
161
+
162
162
/**
163
163
* Wraps a Flow Subscription and converts the calls to a Reactive Streams Subscription.
164
164
*/
165
165
static final class ReactiveToFlowSubscription implements org .reactivestreams .Subscription {
166
166
private final Flow .Subscription flow ;
167
-
167
+
168
168
public ReactiveToFlowSubscription (Flow .Subscription flow ) {
169
169
this .flow = flow ;
170
170
}
@@ -178,18 +178,18 @@ public void request(long n) {
178
178
public void cancel () {
179
179
flow .cancel ();
180
180
}
181
-
182
-
181
+
182
+
183
183
}
184
-
184
+
185
185
/**
186
186
* Wraps a Reactive Streams Subscriber and forwards methods of the Flow Subscriber to it.
187
187
* @param <T> the element type
188
188
*/
189
- static final class FlowToReactiveSubscriber <T >
189
+ static final class FlowToReactiveSubscriber <T >
190
190
implements Flow .Subscriber <T > {
191
191
private final org .reactivestreams .Subscriber <? super T > reactiveStreams ;
192
-
192
+
193
193
public FlowToReactiveSubscriber (org .reactivestreams .Subscriber <? super T > reactive ) {
194
194
this .reactiveStreams = reactive ;
195
195
}
@@ -213,17 +213,17 @@ public void onError(Throwable throwable) {
213
213
public void onComplete () {
214
214
reactiveStreams .onComplete ();
215
215
}
216
-
216
+
217
217
}
218
218
219
219
/**
220
220
* Wraps a Reactive Streams Subscriber and forwards methods of the Flow Subscriber to it.
221
221
* @param <T> the element type
222
222
*/
223
- static final class ReactiveToFlowSubscriber <T >
223
+ static final class ReactiveToFlowSubscriber <T >
224
224
implements org .reactivestreams .Subscriber <T > {
225
225
private final Flow .Subscriber <? super T > flow ;
226
-
226
+
227
227
public ReactiveToFlowSubscriber (Flow .Subscriber <? super T > flow ) {
228
228
this .flow = flow ;
229
229
}
@@ -247,9 +247,9 @@ public void onError(Throwable throwable) {
247
247
public void onComplete () {
248
248
flow .onComplete ();
249
249
}
250
-
250
+
251
251
}
252
-
252
+
253
253
/**
254
254
* Wraps a Flow Processor and forwards methods of the Reactive Streams Processor to it.
255
255
* @param <T> the input type
@@ -258,7 +258,7 @@ public void onComplete() {
258
258
static final class ReactiveToFlowProcessor <T , U >
259
259
implements org .reactivestreams .Processor <T , U > {
260
260
final Flow .Processor <? super T , ? extends U > flow ;
261
-
261
+
262
262
public ReactiveToFlowProcessor (Flow .Processor <? super T , ? extends U > flow ) {
263
263
this .flow = flow ;
264
264
}
@@ -292,7 +292,7 @@ public void subscribe(org.reactivestreams.Subscriber<? super U> s) {
292
292
flow .subscribe (new FlowToReactiveSubscriber <U >(s ));
293
293
}
294
294
}
295
-
295
+
296
296
/**
297
297
* Wraps a Reactive Streams Processor and forwards methods of the Flow Processor to it.
298
298
* @param <T> the input type
@@ -301,7 +301,7 @@ public void subscribe(org.reactivestreams.Subscriber<? super U> s) {
301
301
static final class FlowToReactiveProcessor <T , U >
302
302
implements Flow .Processor <T , U > {
303
303
final org .reactivestreams .Processor <? super T , ? extends U > reactiveStreams ;
304
-
304
+
305
305
public FlowToReactiveProcessor (org .reactivestreams .Processor <? super T , ? extends U > reactive ) {
306
306
this .reactiveStreams = reactive ;
307
307
}
@@ -380,4 +380,4 @@ public void subscribe(Flow.Subscriber<? super T> flow) {
380
380
}
381
381
}
382
382
383
- }
383
+ }
0 commit comments