T - Subscriber typepublic class ReactiveSubscriber<T>
extends java.lang.Object
implements org.reactivestreams.Subscriber<T>
| Constructor and Description |
|---|
ReactiveSubscriber() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isInitialized() |
void |
onComplete() |
void |
onError(java.lang.Throwable t) |
void |
onNext(T t) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
ReactiveSeq<T> |
reactiveStream()
ReactiveSubscriber<Integer> sub = Spouts.reactiveSubscriber();
Flux.just(1,2,3).forEachAsync(sub);
sub.reactiveStream().forEach(System.out::println);
//note JDK Stream based terminal operations may block the current thread
//see ReactiveSeq#collectStream ReactiveSeq#foldAll for non-blocking alternatives
|
public ReactiveSeq<T> reactiveStream()
ReactiveSubscriber<Integer> sub = Spouts.reactiveSubscriber();
Flux.just(1,2,3).forEachAsync(sub);
sub.reactiveStream().forEach(System.out::println);
//note JDK Stream based terminal operations may block the current thread
//see ReactiveSeq#collectStream ReactiveSeq#foldAll for non-blocking alternatives
public void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe in interface org.reactivestreams.Subscriber<T>public void onError(java.lang.Throwable t)
onError in interface org.reactivestreams.Subscriber<T>public void onComplete()
onComplete in interface org.reactivestreams.Subscriber<T>public boolean isInitialized()