Class ObservableConverter

  • All Implemented Interfaces:
    ReactiveTypeConverter<io.reactivex.Observable>

    public class ObservableConverter
    extends Object
    implements ReactiveTypeConverter<io.reactivex.Observable>
    Converter handling the RX Java 2 Observable type. toCompletionStage
    The toCompletionStage(Observable) method returns a CompletionStage instance completed or failed according to the stream emissions. The returned CompletionStage is redeemed either the first emitted value or null to distinguish stream emitting values from empty streams. If the stream is empty, the returned CompletionStage is completed with null. If the stream emits multiple values, the first one is used, and the CompletionStage is completed with an instance of the first emitted item. Other items and potential error are ignored. If the stream fails before emitting a first item, the CompletionStage is completed with the failure. fromCompletionStage
    The fromCompletionStage(CompletionStage) method returns a Observable instance completed or failed according to the passed CompletionStage completion. Note that if the future emits a null value, the Observable fails. If the future completes with a value, the observable emits the value and then completes. If the future completes with a failure, the stream emits the failure. fromPublisher
    The fromPublisher(Publisher) method returns a Observable emitting the same items, failure and completion as the passed Publisher. If the passed Publisher is empty, the returned Observable is also empty. The source Publisher is consumed in an unbounded fashion without applying any back-pressure to it. This is because of Observable.fromPublisher(Publisher) used by this method. toRSPublisher
    The toRSPublisher(Observable) method returns a Publisher emitting the same events as the source Observable. This operations applies the a missing back-pressure strategy. OnNext events are written without any buffering or dropping. The consumer of the returned Publisher has to deal with any overflow.