Top Description Inners Fields Constructors Methods
rx.internal.operators

public final Class OperatorWindowWithStartEndObservable<T, U, V>

extends Object
implements Observable.Operator<Observable<T>, T>
Class Inheritance
All Implemented Interfaces
rx.Observable.Operator, rx.functions.Func1, rx.functions.Function
Type Parameters
<T>
the value type
<U>
the type of the window opening event
<V>
the type of the window closing event
Imports
java.util.*, rx.Observable, .Observable.Operator, .Observer, .Subscriber, rx.functions.Func1, rx.observers.*, rx.subjects.UnicastSubject, rx.subscriptions.CompositeSubscription

Creates potentially overlapping windows of the source items where each window is started by a value emitted by an observable and closed when an associated Observable emits a value or completes.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
OperatorWindowWithStartEndObservable.SerializedSubject<T>

Serialized access to the subject.

pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv final Func1<? super U, ? extends Observable<? extends V>>
pack-priv final Observable<? extends U>

Constructor Summary

AccessConstructor and Description
public
OperatorWindowWithStartEndObservable(Observable<? extends U> windowOpenings, Func1<? super U, ? extends Observable<? extends V>> windowClosingSelector)

Method Summary

Modifier and TypeMethod and Description
public Subscriber<? super T>
call(Subscriber<? super Observable<T>> child)

Implements rx.functions.Func1.call.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

windowClosingSelectorback to summary
pack-priv final Func1<? super U, ? extends Observable<? extends V>> windowClosingSelector
windowOpeningsback to summary
pack-priv final Observable<? extends U> windowOpenings

Constructor Detail

OperatorWindowWithStartEndObservableback to summary
public OperatorWindowWithStartEndObservable(Observable<? extends U> windowOpenings, Func1<? super U, ? extends Observable<? extends V>> windowClosingSelector)

Method Detail

callback to summary
public Subscriber<? super T> call(Subscriber<? super Observable<T>> child)

Implements rx.functions.Func1.call.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OperatorWindowWithStartEndObservable.SerializedSubject<T>

extends Object
Class Inheritance
  • java.lang.Object
  • rx.internal.operators.OperatorWindowWithStartEndObservable.SerializedSubject

Serialized access to the subject.

Field Summary

Modifier and TypeField and Description
pack-priv final Observer<T>
pack-priv final Observable<T>

Constructor Summary

AccessConstructor and Description
public
SerializedSubject(Observer<T> consumer, Observable<T> producer)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

consumerback to summary
pack-priv final Observer<T> consumer
producerback to summary
pack-priv final Observable<T> producer

Constructor Detail

SerializedSubjectback to summary
public SerializedSubject(Observer<T> consumer, Observable<T> producer)
rx.internal.operators back to summary

pack-priv final Class OperatorWindowWithStartEndObservable.SourceSubscriber

extends Subscriber<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final Subscriber<? super Observable<T>>
pack-priv final List<OperatorWindowWithStartEndObservable.SerializedSubject<T>>
chunks

Guarded by guard.

pack-priv final CompositeSubscription
pack-priv boolean
done

Guarded by guard.

pack-priv final Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
beginWindow(U token)

pack-priv OperatorWindowWithStartEndObservable.SerializedSubject<T>
pack-priv void
public void
onCompleted()

Implements rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.
public void
onError(Throwable
the exception encountered by the Observable
e
)

Implements rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.
public void
onNext(T
the item emitted by the Observable
t
)

Implements rx.Observer.onNext.

Provides the Observer with a new item to observe.
public void
onStart()

Overrides rx.Subscriber.onStart.

This method is invoked when the Subscriber and Observable have been connected but the Observable has not yet begun to emit items or send notifications to the Subscriber.
Inherited from rx.Subscriber:
addisUnsubscribedrequestsetProducerunsubscribe

Field Detail

childback to summary
pack-priv final Subscriber<? super Observable<T>> child
chunksback to summary
pack-priv final List<OperatorWindowWithStartEndObservable.SerializedSubject<T>> chunks

Guarded by guard.

compositeback to summary
pack-priv final CompositeSubscription composite
doneback to summary
pack-priv boolean done

Guarded by guard.

guardback to summary
pack-priv final Object guard

Constructor Detail

SourceSubscriberback to summary
public SourceSubscriber(Subscriber<? super Observable<T>> child, CompositeSubscription composite)

Method Detail

beginWindowback to summary
pack-priv void beginWindow(U token)
createSerializedSubjectback to summary
pack-priv OperatorWindowWithStartEndObservable.SerializedSubject<T> createSerializedSubject()
endWindowback to summary
pack-priv void endWindow(OperatorWindowWithStartEndObservable.SerializedSubject<T> window)
onCompletedback to summary
public void onCompleted()

Implements rx.Observer.onCompleted.

Doc from rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.

The Observable will not call this method if it calls onError.

Annotations
@Override
onErrorback to summary
public void onError(Throwable e)

Implements rx.Observer.onError.

Doc from rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.

If the Observable calls this method, it will not thereafter call onNext or onCompleted.

Parameters
e:Throwable

the exception encountered by the Observable

Annotations
@Override
onNextback to summary
public void onNext(T t)

Implements rx.Observer.onNext.

Doc from rx.Observer.onNext.

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 either onCompleted or onError.

Parameters
t:T

the item emitted by the Observable

Annotations
@Override
onStartback to summary
public void onStart()

Overrides rx.Subscriber.onStart.

Doc from rx.Subscriber.onStart.

This method is invoked when the Subscriber and Observable have been connected but the Observable has not yet begun to emit items or send notifications to the Subscriber. Override this method to add any useful initialization to your subscription, for instance to initiate backpressure.

Annotations
@Override