Class FlowableHelper

    • Constructor Detail

      • FlowableHelper

        public FlowableHelper()
    • Method Detail

      • toReadStream

        public static <T> ReadStream<T> toReadStream​(Flowable<T> observable)
        Adapts an RxJava Flowable to a Vert.x ReadStream. The returned readstream will be subscribed to the Flowable.

        Parameters:
        observable - the observable to adapt
        Returns:
        the adapted stream
      • toFlowable

        public static <T> Flowable<T> toFlowable​(ReadStream<T> stream)
        Adapts a Vert.x ReadStream to an RxJava Flowable. After the stream is adapted to a flowable, the original stream handlers should not be used anymore as they will be used by the flowable adapter.

        Parameters:
        stream - the stream to adapt
        Returns:
        the adapted observable
      • toFlowable

        public static <T> Flowable<T> toFlowable​(ReadStream<T> stream,
                                                 long maxBufferSize)
        Adapts a Vert.x ReadStream to an RxJava Flowable. After the stream is adapted to a flowable, the original stream handlers should not be used anymore as they will be used by the flowable adapter.

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