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) long
Remembers how many elements have been emitted before the requests run out.(package private) Throwable
The single exception if not null, should be written before setting finished (release) and read after reading finished (acquire).(package private) boolean
(package private) final int
The 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 TypeMethodDescriptionvoid
call()
(package private) boolean
checkTerminated
(boolean done, boolean isEmpty, Subscriber<? super T> a, Queue<Object> q) (package private) void
init()
void
Notifies the Observer that theObservable
has finished sending push-based notifications.void
Notifies the Observer that theObservable
has experienced an error condition.void
Provides the Observer with a new item to observe.protected void
schedule()
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: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)
. -
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)
.- Specified by:
onCompleted
in interfaceObserver<T>
-
onError
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()
. -
schedule
protected void schedule() -
call
public void call() -
checkTerminated
-