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
Fields Modifier and Type Field Description (package private) Subscriber<? super T>
child
(package private) java.util.concurrent.atomic.AtomicLong
counter
(package private) boolean
delayError
(package private) long
emitted
Remembers how many elements have been emitted before the requests run out.(package private) java.lang.Throwable
error
The single exception if not null, should be written before setting finished (release) and read after reading finished (acquire).(package private) boolean
finished
(package private) int
limit
The emission threshold that should trigger a replenishing request.(package private) NotificationLite<T>
on
(package private) java.util.Queue<java.lang.Object>
queue
(package private) Scheduler.Worker
recursiveScheduler
(package private) java.util.concurrent.atomic.AtomicLong
requested
-
Constructor Summary
Constructors Constructor Description ObserveOnSubscriber(Scheduler scheduler, Subscriber<? super T> child, boolean delayError, int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
call()
(package private) boolean
checkTerminated(boolean done, boolean isEmpty, Subscriber<? super T> a, java.util.Queue<java.lang.Object> q)
(package private) void
init()
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(T t)
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 Detail
-
child
final Subscriber<? super T> child
-
recursiveScheduler
final Scheduler.Worker recursiveScheduler
-
on
final NotificationLite<T> on
-
delayError
final boolean delayError
-
queue
final java.util.Queue<java.lang.Object> queue
-
limit
final int limit
The emission threshold that should trigger a replenishing request.
-
finished
volatile boolean finished
-
requested
final java.util.concurrent.atomic.AtomicLong requested
-
counter
final java.util.concurrent.atomic.AtomicLong counter
-
error
java.lang.Throwable error
The single exception if not null, should be written before setting finished (release) and read after reading finished (acquire).
-
emitted
long emitted
Remembers how many elements have been emitted before the requests run out.
-
-
Constructor Detail
-
ObserveOnSubscriber
public ObserveOnSubscriber(Scheduler scheduler, Subscriber<? super T> child, boolean delayError, int bufferSize)
-
-
Method Detail
-
init
void init()
-
onNext
public void onNext(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)
.
-
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
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()
.
-
schedule
protected void schedule()
-
checkTerminated
boolean checkTerminated(boolean done, boolean isEmpty, Subscriber<? super T> a, java.util.Queue<java.lang.Object> q)
-
-