June 2017
Intermediate to advanced
400 pages
8h 44m
English
When you implement your own ObservableTransformer, you might want to create a FlowableTransformer counterpart as well. This way, you can use your operator on both Observables and Flowables.
The FlowableTransformer is not much different from ObservableTransformer. Of course, it will support backpressure since it is composed with Flowables. Otherwise, it is pretty much the same in its usage except that you obviously pass it to compose() on a Flowable, not Observable.
Here, we take our toImmutableList() method returning an ObservableTransformer and implement it as FlowableTransformer instead:
import com.google.common.collect.ImmutableList; import io.reactivex.Flowable; import io.reactivex.FlowableTransformer; public class ...
Read now
Unlock full access