public class ObservableHelper extends Object
Constructor and Description |
---|
ObservableHelper() |
Modifier and Type | Method and Description |
---|---|
static <T> io.reactivex.Observable<T> |
toObservable(ReadStream<T> stream)
|
static <T,U> io.reactivex.Observable<U> |
toObservable(ReadStream<T> stream,
Function<T,U> mapping)
Like
toObservable(ReadStream) but with a mapping function |
static <T> ReadStream<T> |
toReadStream(io.reactivex.Observable<T> observable)
Adapts an RxJava
Observable to a Vert.x io.vertx.core.streams.ReadStream . |
static <T> io.reactivex.ObservableTransformer<Buffer,T> |
unmarshaller(Class<T> mappedType) |
static <T> io.reactivex.ObservableTransformer<Buffer,T> |
unmarshaller(Class<T> mappedType,
com.fasterxml.jackson.databind.ObjectMapper mapper) |
static <T> io.reactivex.ObservableTransformer<Buffer,T> |
unmarshaller(com.fasterxml.jackson.core.type.TypeReference<T> mappedTypeRef) |
static <T> io.reactivex.ObservableTransformer<Buffer,T> |
unmarshaller(com.fasterxml.jackson.core.type.TypeReference<T> mappedTypeRef,
com.fasterxml.jackson.databind.ObjectMapper mapper) |
public static <T> ReadStream<T> toReadStream(io.reactivex.Observable<T> observable)
Observable
to a Vert.x io.vertx.core.streams.ReadStream
. The returned
readstream will be subscribed to the Observable
.observable
- the observable to adaptpublic static <T> io.reactivex.Observable<T> toObservable(ReadStream<T> stream)
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.stream
- the stream to adaptpublic static <T,U> io.reactivex.Observable<U> toObservable(ReadStream<T> stream, Function<T,U> mapping)
toObservable(ReadStream)
but with a mapping
functionpublic static <T> io.reactivex.ObservableTransformer<Buffer,T> unmarshaller(Class<T> mappedType)
public static <T> io.reactivex.ObservableTransformer<Buffer,T> unmarshaller(com.fasterxml.jackson.core.type.TypeReference<T> mappedTypeRef)
public static <T> io.reactivex.ObservableTransformer<Buffer,T> unmarshaller(Class<T> mappedType, com.fasterxml.jackson.databind.ObjectMapper mapper)
public static <T> io.reactivex.ObservableTransformer<Buffer,T> unmarshaller(com.fasterxml.jackson.core.type.TypeReference<T> mappedTypeRef, com.fasterxml.jackson.databind.ObjectMapper mapper)
Copyright © 2018 Eclipse. All rights reserved.