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) boolean
delayError
(package private) boolean
emitting
(package private) java.lang.Throwable
error
(package private) java.util.concurrent.atomic.AtomicLong
index
(package private) boolean
innerActive
(package private) boolean
mainDone
(package private) boolean
missed
(package private) NotificationLite<T>
nl
(package private) Producer
producer
(package private) SpscLinkedArrayQueue<java.lang.Object>
queue
(package private) long
requested
(package private) SerialSubscription
ssub
(package private) static java.lang.Throwable
TERMINAL_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 boolean
checkTerminated(boolean localMainDone, boolean localInnerActive, java.lang.Throwable localError, SpscLinkedArrayQueue<java.lang.Object> localQueue, Subscriber<? super T> localChild, boolean empty)
(package private) void
childRequested(long n)
(package private) void
clearProducer()
(package private) void
complete(long id)
(package private) void
drain()
(package private) void
emit(T value, OperatorSwitch.InnerSubscriber<T> inner)
(package private) void
error(java.lang.Throwable e, long id)
(package private) void
init()
(package private) void
innerProducer(Producer p, long id)
void
onCompleted()
Notifies the Observer that theObservable
has finished sending push-based notifications.void
onError(java.lang.Throwable e)
Notifies the Observer that theObservable
has experienced an error condition.void
onNext(Observable<? extends T> t)
Provides the Observer with a new item to observe.(package private) void
pluginError(java.lang.Throwable e)
(package private) boolean
updateError(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:Observer
Provides the Observer with a new item to observe.The
Observable
may call this method 0 or more times.The
Observable
will 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:Observer
Notifies the Observer that theObservable
has experienced an error condition.If the
Observable
calls 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:Observer
Notifies the Observer that theObservable
has finished sending push-based notifications.The
Observable
will 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)
-
-