RxJava



rx.operators
Class ChunkedOperation.ObservableBasedMultiChunkCreator<T,C>

java.lang.Object
  extended by rx.operators.ChunkedOperation.ObservableBasedMultiChunkCreator<T,C>
Type Parameters:
T - The type of object all internal ChunkedOperation.Chunk objects record. The type of object being tracked by the ChunkedOperation.Chunk
All Implemented Interfaces:
ChunkedOperation.ChunkCreator
Enclosing class:
ChunkedOperation

protected static class ChunkedOperation.ObservableBasedMultiChunkCreator<T,C>
extends java.lang.Object
implements ChunkedOperation.ChunkCreator

This ChunkedOperation.ChunkCreator creates a new ChunkedOperation.Chunk whenever it receives an object from the provided chunkOpenings Observable, and closes the corresponding ChunkedOperation.Chunk object when it receives an object from the provided Observable created with the chunkClosingSelector Func1.


Constructor Summary
ChunkedOperation.ObservableBasedMultiChunkCreator(ChunkedOperation.OverlappingChunks<T,C> chunks, Observable<? extends Opening> openings, Func1<Opening,? extends Observable<? extends Closing>> chunkClosingSelector)
           
 
Method Summary
 void onValuePushed()
          Signifies a onNext event.
 void stop()
          Signifies a onCompleted or onError event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChunkedOperation.ObservableBasedMultiChunkCreator

public ChunkedOperation.ObservableBasedMultiChunkCreator(ChunkedOperation.OverlappingChunks<T,C> chunks,
                                                         Observable<? extends Opening> openings,
                                                         Func1<Opening,? extends Observable<? extends Closing>> chunkClosingSelector)
Method Detail

onValuePushed

public void onValuePushed()
Description copied from interface: ChunkedOperation.ChunkCreator
Signifies a onNext event.

Specified by:
onValuePushed in interface ChunkedOperation.ChunkCreator

stop

public void stop()
Description copied from interface: ChunkedOperation.ChunkCreator
Signifies a onCompleted or onError event. Should be used to clean up open subscriptions and other still running background tasks.

Specified by:
stop in interface ChunkedOperation.ChunkCreator