T
- source value typeR
- result value typepublic abstract class DeferredScalarSubscriberSafe<T,R> extends DeferredScalarSubscriber<T,R>
DeferredScalarSubscriber
with defensive behaviour that ensures no emissions
occur after a terminal event. If onError
is called more than once then errors after the first
are reported to RxJavaHooks.onError
.Modifier and Type | Field and Description |
---|---|
protected boolean |
done |
actual, hasValue, value
Constructor and Description |
---|
DeferredScalarSubscriberSafe(Subscriber<? super R> actual) |
Modifier and Type | Method and Description |
---|---|
void |
onCompleted()
Notifies the Observer that the
Observable has finished sending push-based notifications. |
void |
onError(Throwable ex)
Notifies the Observer that the
Observable has experienced an error condition. |
complete, complete, setProducer, subscribeTo
add, isUnsubscribed, onStart, request, unsubscribe
public DeferredScalarSubscriberSafe(Subscriber<? super R> actual)
public void onError(Throwable ex)
Observer
Observable
has experienced an error condition.
If the Observable
calls this method, it will not thereafter call Observer.onNext(T)
or
Observer.onCompleted()
.
public void onCompleted()
Observer
Observable
has finished sending push-based notifications.
The Observable
will not call this method if it calls Observer.onError(java.lang.Throwable)
.
onCompleted
in interface Observer<T>
onCompleted
in class DeferredScalarSubscriber<T,R>
Copyright © 2017. All rights reserved.