Package io.vertx.reactivex
Class FlowableHelper
- java.lang.Object
-
- io.vertx.reactivex.FlowableHelper
-
public class FlowableHelper extends Object
- Author:
- Julien Viet
-
-
Constructor Summary
Constructors Constructor Description FlowableHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Flowable<T>toFlowable(ReadStream<T> stream)Adapts a Vert.xReadStreamto an RxJavaFlowable.static <T> Flowable<T>toFlowable(ReadStream<T> stream, long maxBufferSize)Adapts a Vert.xReadStreamto an RxJavaFlowable.static <T,U>
Flowable<U>toFlowable(ReadStream<T> stream, Function<T,U> mapping)LiketoFlowable(ReadStream)but with amappingfunctionstatic <T> ReadStream<T>toReadStream(Flowable<T> observable)Adapts an RxJavaFlowableto a Vert.xReadStream.static <T> FlowableTransformer<Buffer,T>unmarshaller(TypeReference<T> mappedTypeRef)static <T> FlowableTransformer<Buffer,T>unmarshaller(TypeReference<T> mappedTypeRef, ObjectCodec mapper)static <T> FlowableTransformer<Buffer,T>unmarshaller(Class<T> mappedType)static <T> FlowableTransformer<Buffer,T>unmarshaller(Class<T> mappedType, ObjectCodec mapper)
-
-
-
Method Detail
-
toReadStream
public static <T> ReadStream<T> toReadStream(Flowable<T> observable)
Adapts an RxJavaFlowableto a Vert.xReadStream. The returned readstream will be subscribed to theFlowable.- Parameters:
observable- the observable to adapt- Returns:
- the adapted stream
-
toFlowable
public static <T,U> Flowable<U> toFlowable(ReadStream<T> stream, Function<T,U> mapping)
LiketoFlowable(ReadStream)but with amappingfunction
-
toFlowable
public static <T> Flowable<T> toFlowable(ReadStream<T> stream)
Adapts a Vert.xReadStreamto an RxJavaFlowable. 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.xReadStreamto an RxJavaFlowable. 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
-
unmarshaller
public static <T> FlowableTransformer<Buffer,T> unmarshaller(Class<T> mappedType)
-
unmarshaller
public static <T> FlowableTransformer<Buffer,T> unmarshaller(TypeReference<T> mappedTypeRef)
-
unmarshaller
public static <T> FlowableTransformer<Buffer,T> unmarshaller(Class<T> mappedType, ObjectCodec mapper)
-
unmarshaller
public static <T> FlowableTransformer<Buffer,T> unmarshaller(TypeReference<T> mappedTypeRef, ObjectCodec mapper)
-
-