Top Description Constructors Methods
io.reactivex.rxjava3.internal.operators.flowable

public final Class FlowableBlockingSubscribe

extends Object
Class Inheritance
Imports
java.util.Objects, java.util.concurrent.*, org.reactivestreams.*, io.reactivex.rxjava3.functions.*, io.reactivex.rxjava3.internal.functions.*, io.reactivex.rxjava3.internal.subscribers.*, io.reactivex.rxjava3.internal.util.*

Utility methods to consume a Publisher in a blocking manner with callbacks or Subscriber.

Constructor Summary

AccessConstructor and Description
private
FlowableBlockingSubscribe()

Utility class.

Method Summary

Modifier and TypeMethod and Description
public static <
the value type
T
>
void
subscribe(Publisher<? extends T>
the source publisher The cancellation and backpressure is composed through.
source
,
Subscriber<? super T>
the subscriber to forward events and calls to in the current thread
subscriber
)

Subscribes to the source and calls the Subscriber methods on the current thread.

public static <
the value type
T
>
void
subscribe(Publisher<? extends T>
the source to await
source
)

Runs the source observable to a terminal event, ignoring any values and rethrowing any exception.

public static <
the value type
T
>
void
subscribe(Publisher<? extends T>
the source publisher
o
,
final Consumer<? super T>
the callback action for each source value
onNext
,
final Consumer<? super Throwable>
the callback action for an error event
onError
,
final Action
the callback action for the completion event.
onComplete
)

Subscribes to the source and calls the given actions on the current thread.

public static <
the value type
T
>
void
subscribe(Publisher<? extends T>
the source publisher
o
,
final Consumer<? super T>
the callback action for each source value
onNext
,
final Consumer<? super Throwable>
the callback action for an error event
onError
,
final Action
the callback action for the completion event.
onComplete
,
int
the number of elements to prefetch from the source Publisher
bufferSize
)

Subscribes to the source and calls the given actions on the current thread.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FlowableBlockingSubscribeback to summary
private FlowableBlockingSubscribe()

Utility class.

Method Detail

subscribeback to summary
public static <T> void subscribe(Publisher<? extends T> source, Subscriber<? super T> subscriber)

Subscribes to the source and calls the Subscriber methods on the current thread.

Parameters
<T>
the value type
source:Publisher<? extends T>

the source publisher The cancellation and backpressure is composed through.

subscriber:Subscriber<? super T>

the subscriber to forward events and calls to in the current thread

subscribeback to summary
public static <T> void subscribe(Publisher<? extends T> source)

Runs the source observable to a terminal event, ignoring any values and rethrowing any exception.

Parameters
<T>
the value type
source:Publisher<? extends T>

the source to await

subscribeback to summary
public static <T> void subscribe(Publisher<? extends T> o, final Consumer<? super T> onNext, final Consumer<? super Throwable> onError, final Action onComplete)

Subscribes to the source and calls the given actions on the current thread.

Parameters
<T>
the value type
o:Publisher<? extends T>

the source publisher

onNext:Consumer<? super T>

the callback action for each source value

onError:Consumer<? super Throwable>

the callback action for an error event

onComplete:Action

the callback action for the completion event.

subscribeback to summary
public static <T> void subscribe(Publisher<? extends T> o, final Consumer<? super T> onNext, final Consumer<? super Throwable> onError, final Action onComplete, int bufferSize)

Subscribes to the source and calls the given actions on the current thread.

Parameters
<T>
the value type
o:Publisher<? extends T>

the source publisher

onNext:Consumer<? super T>

the callback action for each source value

onError:Consumer<? super Throwable>

the callback action for an error event

onComplete:Action

the callback action for the completion event.

bufferSize:int

the number of elements to prefetch from the source Publisher