T - the buffered value typepublic final class OperatorBufferWithStartEndObservable<T,TOpening,TClosing> extends java.lang.Object implements Observable.Operator<java.util.List<T>,T>
Observable source and stores them in the currently active chunks.
Initially there are no chunks active.
Chunks can be created by pushing a TOpening value to the "bufferOpenings"
Observable. This creates a new buffer which will then start recording values which are produced
by the "source" Observable. Additionally the "bufferClosingSelector" will be used to construct an
Observable which can produce values. When it does so it will close this (and only this) newly
created buffer. When the source Observable completes or produces an error, all chunks are
emitted, and the event is propagated to all subscribed Observers.
Note that when using this operation multiple overlapping chunks could be active at any one point.
| Constructor and Description |
|---|
OperatorBufferWithStartEndObservable(Observable<? extends TOpening> bufferOpenings,
Func1<? super TOpening,? extends Observable<? extends TClosing>> bufferClosingSelector) |
| Modifier and Type | Method and Description |
|---|---|
Subscriber<? super T> |
call(Subscriber<? super java.util.List<T>> child) |
public OperatorBufferWithStartEndObservable(Observable<? extends TOpening> bufferOpenings, Func1<? super TOpening,? extends Observable<? extends TClosing>> bufferClosingSelector)
bufferOpenings - an Observable which when it produces a TOpening value will create a
new buffer which instantly starts recording the "source" ObservablebufferClosingSelector - a Func1 object which produces Observables. These Observables determine
when a buffer is emitted and replaced by simply producing an object.public Subscriber<? super T> call(Subscriber<? super java.util.List<T>> child)
call in interface Func1<Subscriber<? super java.util.List<T>>,Subscriber<? super T>>