T - the buffered value type
public final class OperatorBufferWithStartEndObservable<T,TOpening extends Object,TClosing> implements Observable .Operator <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
|
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"
Observable
bufferClosingSelector - 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 List <T>> child)