Top Description Constructors Methods
io.reactivex.internal.operators.observable

public final Class ObservableBlockingSubscribe

extends Object
Class Inheritance
Imports
java.util.concurrent.*, io.reactivex.*, io.reactivex.functions.*, io.reactivex.internal.functions.*, io.reactivex.internal.observers.*, io.reactivex.internal.util.*

Utility methods to consume an Observable in a blocking manner with callbacks or Observer.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <
the value type
T
>
void
subscribe(ObservableSource<? extends T>
the source ObservableSource The call to dispose() is composed through.
o
,
Observer<? super T>
the subscriber to forward events and calls to in the current thread
observer
)

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

public static <
the value type
T
>
void
subscribe(ObservableSource<? extends T>
the source ObservableSource
o
)

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

public static <
the value type
T
>
void
subscribe(ObservableSource<? extends T>
the source ObservableSource
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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ObservableBlockingSubscribeback to summary
private ObservableBlockingSubscribe()

Utility class.

Method Detail

subscribeback to summary
public static <T> void subscribe(ObservableSource<? extends T> o, Observer<? super T> observer)

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

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

the source ObservableSource The call to dispose() is composed through.

observer:Observer<? super T>

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

subscribeback to summary
public static <T> void subscribe(ObservableSource<? extends T> o)

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

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

the source ObservableSource

subscribeback to summary
public static <T> void subscribe(ObservableSource<? 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:ObservableSource<? extends T>

the source ObservableSource

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.