public final class ObservableBlockingSubscribe extends Object
Modifier and Type | Method and Description |
---|---|
static <T> void |
subscribe(ObservableSource<? extends T> o)
Runs the source observable to a terminal event, ignoring any values and rethrowing any exception.
|
static <T> void |
subscribe(ObservableSource<? 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(ObservableSource<? extends T> o,
Observer<? super T> observer)
Subscribes to the source and calls the Observer methods on the current thread.
|
public static <T> void subscribe(ObservableSource<? extends T> o, Observer<? super T> observer)
T
- the value typeo
- the source ObservableSource
The call to dispose() is composed through.observer
- the subscriber to forward events and calls to in the current threadpublic static <T> void subscribe(ObservableSource<? extends T> o)
T
- the value typeo
- the source ObservableSourcepublic static <T> void subscribe(ObservableSource<? extends T> o, Consumer<? super T> onNext, Consumer<? super Throwable> onError, Action onComplete)
T
- the value typeo
- the source ObservableSourceonNext
- the callback action for each source valueonError
- the callback action for an error eventonComplete
- the callback action for the completion event.Copyright © 2019. All rights reserved.