Class FlowableBlockingSubscribe
java.lang.Object
io.reactivex.rxjava3.internal.operators.flowable.FlowableBlockingSubscribe
Utility methods to consume a Publisher in a blocking manner with callbacks or Subscriber.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> void
subscribe
(org.reactivestreams.Publisher<? extends T> source) Runs the source observable to a terminal event, ignoring any values and rethrowing any exception.static <T> void
subscribe
(org.reactivestreams.Publisher<? extends T> o, Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete) Subscribes to the source and calls the given actions on the current thread.static <T> void
subscribe
(org.reactivestreams.Publisher<? extends T> o, Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete, int bufferSize) Subscribes to the source and calls the given actions on the current thread.static <T> void
subscribe
(org.reactivestreams.Publisher<? extends T> source, org.reactivestreams.Subscriber<? super T> subscriber) Subscribes to the source and calls the Subscriber methods on the current thread.
-
Constructor Details
-
FlowableBlockingSubscribe
private FlowableBlockingSubscribe()Utility class.
-
-
Method Details
-
subscribe
public static <T> void subscribe(org.reactivestreams.Publisher<? extends T> source, org.reactivestreams.Subscriber<? super T> subscriber) Subscribes to the source and calls the Subscriber methods on the current thread.- Type Parameters:
T
- the value type- Parameters:
source
- the source publisher The cancellation and backpressure is composed through.subscriber
- the subscriber to forward events and calls to in the current thread
-
subscribe
public static <T> void subscribe(org.reactivestreams.Publisher<? extends T> source) Runs the source observable to a terminal event, ignoring any values and rethrowing any exception.- Type Parameters:
T
- the value type- Parameters:
source
- the source to await
-
subscribe
public static <T> void subscribe(org.reactivestreams.Publisher<? extends T> o, Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete) Subscribes to the source and calls the given actions on the current thread.- Type Parameters:
T
- the value type- Parameters:
o
- the source publisheronNext
- the callback action for each source valueonError
- the callback action for an error eventonComplete
- the callback action for the completion event.
-
subscribe
public static <T> void subscribe(org.reactivestreams.Publisher<? extends T> o, Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete, int bufferSize) Subscribes to the source and calls the given actions on the current thread.- Type Parameters:
T
- the value type- Parameters:
o
- the source publisheronNext
- the callback action for each source valueonError
- the callback action for an error eventonComplete
- the callback action for the completion event.bufferSize
- the number of elements to prefetch from the source Publisher
-