Package io.vertx.rxjava3

## Class ObservableHelper

- java.lang.Object
- - io.vertx.rxjava3.ObservableHelper

-     public class ObservableHelper
      extends Object

  Author:
    Julien Viet

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ObservableHelper()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static <T> Observable<T>` | `toObservable​(ReadStream<T> stream)` | Adapts a Vert.x `` to an RxJava ``.
    `static <T,​U> Observable<U>` | `toObservable​(ReadStream<T> stream, java.util.function.Function<T,​U> mapping)` | Like `toObservable(ReadStream)` but with a `mapping` function
    `static <T> ReadStream<T>` | `toReadStream​(Observable<T> observable)` | Adapts an RxJava `Observable` to a Vert.x `ReadStream`.
    `static <T> ObservableTransformer<Buffer,​T>` | `unmarshaller​(TypeReference<T> mappedTypeRef)` |
    `static <T> ObservableTransformer<Buffer,​T>` | `unmarshaller​(TypeReference<T> mappedTypeRef, ObjectCodec mapper)` |
    `static <T> ObservableTransformer<Buffer,​T>` | `unmarshaller​(Class<T> mappedType)` |
    `static <T> ObservableTransformer<Buffer,​T>` | `unmarshaller​(Class<T> mappedType, ObjectCodec mapper)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ObservableHelper

          public ObservableHelper()

  - ### Method Detail

    - #### toReadStream

          public static <T> ReadStream<T> toReadStream​(Observable<T> observable)

      Adapts an RxJava `Observable` to a Vert.x `ReadStream`. The returned readstream will be subscribed to the `Observable`.

      Parameters:
        `observable` - the observable to adapt
      Returns:
        the adapted stream

    - #### toObservable

          public static <T> Observable<T> toObservable​(ReadStream<T> stream)

      Adapts a Vert.x `` to an RxJava ``. After the stream is adapted to an observable, the original stream handlers should not be used anymore as they will be used by the observable adapter.

      Parameters:
        `stream` - the stream to adapt
      Returns:
        the adapted observable

    - #### toObservable

          public static <T,​U> Observable<U> toObservable​(ReadStream<T> stream,
                                                               java.util.function.Function<T,​U> mapping)

      Like `toObservable(ReadStream)` but with a `mapping` function

    - #### unmarshaller

          public static <T> ObservableTransformer<Buffer,​T> unmarshaller​(Class<T> mappedType)

    - #### unmarshaller

          public static <T> ObservableTransformer<Buffer,​T> unmarshaller​(TypeReference<T> mappedTypeRef)

    - #### unmarshaller

          public static <T> ObservableTransformer<Buffer,​T> unmarshaller​(Class<T> mappedType,
                                                                               ObjectCodec mapper)

    - #### unmarshaller

          public static <T> ObservableTransformer<Buffer,​T> unmarshaller​(TypeReference<T> mappedTypeRef,
                                                                               ObjectCodec mapper)