Package rx.internal.operators
Class OperatorSwitch.SwitchSubscriber<T>
- java.lang.Object
-
- rx.Subscriber<Observable<? extends T>>
-
- rx.internal.operators.OperatorSwitch.SwitchSubscriber<T>
-
- All Implemented Interfaces:
Observer<Observable<? extends T>>,Subscription
- Enclosing class:
- OperatorSwitch<T>
static final class OperatorSwitch.SwitchSubscriber<T> extends Subscriber<Observable<? extends T>>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Subscriber<? super T>child(package private) booleandelayError(package private) booleanemitting(package private) java.lang.Throwableerror(package private) java.util.concurrent.atomic.AtomicLongindex(package private) booleaninnerActive(package private) booleanmainDone(package private) booleanmissed(package private) NotificationLite<T>nl(package private) Producerproducer(package private) SpscLinkedArrayQueue<java.lang.Object>queue(package private) longrequested(package private) SerialSubscriptionssub(package private) static java.lang.ThrowableTERMINAL_ERROR
-
Constructor Summary
Constructors Constructor Description SwitchSubscriber(Subscriber<? super T> child, boolean delayError)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckTerminated(boolean localMainDone, boolean localInnerActive, java.lang.Throwable localError, SpscLinkedArrayQueue<java.lang.Object> localQueue, Subscriber<? super T> localChild, boolean empty)(package private) voidchildRequested(long n)(package private) voidclearProducer()(package private) voidcomplete(long id)(package private) voiddrain()(package private) voidemit(T value, OperatorSwitch.InnerSubscriber<T> inner)(package private) voiderror(java.lang.Throwable e, long id)(package private) voidinit()(package private) voidinnerProducer(Producer p, long id)voidonCompleted()Notifies the Observer that theObservablehas finished sending push-based notifications.voidonError(java.lang.Throwable e)Notifies the Observer that theObservablehas experienced an error condition.voidonNext(Observable<? extends T> t)Provides the Observer with a new item to observe.(package private) voidpluginError(java.lang.Throwable e)(package private) booleanupdateError(java.lang.Throwable next)-
Methods inherited from class rx.Subscriber
add, isUnsubscribed, onStart, request, setProducer, unsubscribe
-
-
-
-
Field Detail
-
child
final Subscriber<? super T> child
-
ssub
final SerialSubscription ssub
-
delayError
final boolean delayError
-
index
final java.util.concurrent.atomic.AtomicLong index
-
queue
final SpscLinkedArrayQueue<java.lang.Object> queue
-
nl
final NotificationLite<T> nl
-
emitting
boolean emitting
-
missed
boolean missed
-
requested
long requested
-
producer
Producer producer
-
mainDone
volatile boolean mainDone
-
error
java.lang.Throwable error
-
innerActive
boolean innerActive
-
TERMINAL_ERROR
static final java.lang.Throwable TERMINAL_ERROR
-
-
Constructor Detail
-
SwitchSubscriber
SwitchSubscriber(Subscriber<? super T> child, boolean delayError)
-
-
Method Detail
-
init
void init()
-
clearProducer
void clearProducer()
-
onNext
public void onNext(Observable<? extends T> t)
Description copied from interface:ObserverProvides the Observer with a new item to observe.The
Observablemay call this method 0 or more times.The
Observablewill not call this method again after it calls eitherObserver.onCompleted()orObserver.onError(java.lang.Throwable).- Parameters:
t- the item emitted by the Observable
-
onError
public void onError(java.lang.Throwable e)
Description copied from interface:ObserverNotifies the Observer that theObservablehas experienced an error condition.If the
Observablecalls this method, it will not thereafter callObserver.onNext(T)orObserver.onCompleted().- Parameters:
e- the exception encountered by the Observable
-
updateError
boolean updateError(java.lang.Throwable next)
-
onCompleted
public void onCompleted()
Description copied from interface:ObserverNotifies the Observer that theObservablehas finished sending push-based notifications.The
Observablewill not call this method if it callsObserver.onError(java.lang.Throwable).
-
emit
void emit(T value, OperatorSwitch.InnerSubscriber<T> inner)
-
error
void error(java.lang.Throwable e, long id)
-
complete
void complete(long id)
-
pluginError
void pluginError(java.lang.Throwable e)
-
innerProducer
void innerProducer(Producer p, long id)
-
childRequested
void childRequested(long n)
-
drain
void drain()
-
checkTerminated
protected boolean checkTerminated(boolean localMainDone, boolean localInnerActive, java.lang.Throwable localError, SpscLinkedArrayQueue<java.lang.Object> localQueue, Subscriber<? super T> localChild, boolean empty)
-
-