Package rx.internal.operators
Class OperatorObserveOn.ObserveOnSubscriber<T>
java.lang.Object
rx.Subscriber<T>
rx.internal.operators.OperatorObserveOn.ObserveOnSubscriber<T>
- All Implemented Interfaces:
Action,Action0,Function,Observer<T>,Subscription
- Enclosing class:
OperatorObserveOn<T>
static final class OperatorObserveOn.ObserveOnSubscriber<T>
extends Subscriber<T>
implements Action0
Observe through individual queue per observer.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Subscriber<? super T> (package private) final AtomicLong(package private) final boolean(package private) longRemembers how many elements have been emitted before the requests run out.(package private) ThrowableThe single exception if not null, should be written before setting finished (release) and read after reading finished (acquire).(package private) boolean(package private) final intThe emission threshold that should trigger a replenishing request.(package private) final NotificationLite<T> (package private) final Scheduler.Worker(package private) final AtomicLong -
Constructor Summary
ConstructorsConstructorDescriptionObserveOnSubscriber(Scheduler scheduler, Subscriber<? super T> child, boolean delayError, int bufferSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidcall()(package private) booleancheckTerminated(boolean done, boolean isEmpty, Subscriber<? super T> a, Queue<Object> q) (package private) voidinit()voidNotifies the Observer that theObservablehas finished sending push-based notifications.voidNotifies the Observer that theObservablehas experienced an error condition.voidProvides the Observer with a new item to observe.protected voidschedule()Methods inherited from class rx.Subscriber
add, isUnsubscribed, onStart, request, setProducer, unsubscribe
-
Field Details
-
child
-
recursiveScheduler
-
on
-
delayError
final boolean delayError -
queue
-
limit
final int limitThe emission threshold that should trigger a replenishing request. -
finished
volatile boolean finished -
requested
-
counter
-
error
Throwable errorThe single exception if not null, should be written before setting finished (release) and read after reading finished (acquire). -
emitted
long emittedRemembers how many elements have been emitted before the requests run out.
-
-
Constructor Details
-
ObserveOnSubscriber
public ObserveOnSubscriber(Scheduler scheduler, Subscriber<? super T> child, boolean delayError, int bufferSize)
-
-
Method Details
-
init
void init() -
onNext
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). -
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).- Specified by:
onCompletedin interfaceObserver<T>
-
onError
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(). -
schedule
protected void schedule() -
call
public void call() -
checkTerminated
-