T - the value type received and emitted@Deprecated
public final class SingleSubject<T>
extends io.reactivex.Single<T>
implements io.reactivex.SingleObserver<T>
All methods are thread safe. Calling onSuccess multiple times has no effect. Calling onError multiple times relays the Throwable to the RxJavaPlugins' error handler.
The SingleSubject doesn't store the Disposables coming through onSubscribe but disposes them once the other onXXX methods were called (terminal state reached).
| Modifier and Type | Method and Description |
|---|---|
static <T> SingleSubject<T> |
create()
Deprecated.
Creates a fresh SingleSubject.
|
java.lang.Throwable |
getThrowable()
Deprecated.
Returns the terminal error if this SingleSubject has been terminated with an error, null otherwise.
|
T |
getValue()
Deprecated.
Returns the success value if this SingleSubject was terminated with a success value.
|
boolean |
hasObservers()
Deprecated.
Returns true if this SingleSubject has observers.
|
boolean |
hasThrowable()
Deprecated.
Returns true if this SingleSubject has been terminated with an error.
|
boolean |
hasValue()
Deprecated.
Returns true if this SingleSubject was terminated with a success value.
|
void |
onError(java.lang.Throwable e)
Deprecated.
|
void |
onSubscribe(io.reactivex.disposables.Disposable d)
Deprecated.
|
void |
onSuccess(T value)
Deprecated.
|
protected void |
subscribeActual(io.reactivex.SingleObserver<? super T> observer)
Deprecated.
|
amb, ambArray, ambWith, blockingGet, cache, cast, compose, concat, concat, concat, concat, concat, concat, concat, concatArray, concatWith, contains, contains, create, defer, delay, delay, delaySubscription, delaySubscription, delaySubscription, delaySubscription, delaySubscription, delaySubscription, doAfterSuccess, doAfterTerminate, doFinally, doOnDispose, doOnError, doOnEvent, doOnSubscribe, doOnSuccess, equals, error, error, filter, flatMap, flatMapCompletable, flatMapMaybe, flatMapObservable, flatMapPublisher, flattenAsFlowable, flattenAsObservable, fromCallable, fromFuture, fromFuture, fromFuture, fromFuture, fromObservable, fromPublisher, hide, just, lift, map, merge, merge, merge, merge, merge, merge, mergeWith, never, observeOn, onErrorResumeNext, onErrorResumeNext, onErrorReturn, onErrorReturnItem, repeat, repeat, repeatUntil, repeatWhen, retry, retry, retry, retry, retryWhen, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeWith, takeUntil, takeUntil, takeUntil, test, test, timeout, timeout, timeout, timeout, timer, timer, to, toCompletable, toFlowable, toFuture, toMaybe, toObservable, unsafeCreate, using, using, wrap, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipArray, zipWithpublic static <T> SingleSubject<T> create()
T - the value type received and emittedpublic void onSubscribe(io.reactivex.disposables.Disposable d)
onSubscribe in interface io.reactivex.SingleObserver<T>public void onSuccess(T value)
onSuccess in interface io.reactivex.SingleObserver<T>public void onError(java.lang.Throwable e)
onError in interface io.reactivex.SingleObserver<T>protected void subscribeActual(io.reactivex.SingleObserver<? super T> observer)
subscribeActual in class io.reactivex.Single<T>public T getValue()
public boolean hasValue()
public java.lang.Throwable getThrowable()
public boolean hasThrowable()
public boolean hasObservers()