public class ObservableHelper extends Object
Constructor and Description |
---|
ObservableHelper() |
Modifier and Type | Method and Description |
---|---|
static <T> Observable<T> |
toObservable(ReadStream<T> stream)
|
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 io.vertx.core.streams.ReadStream . |
static <T> ObservableTransformer<Buffer,T> |
unmarshaller(Class<T> mappedType) |
static <T> ObservableTransformer<Buffer,T> |
unmarshaller(Class<T> mappedType,
ObjectCodec mapper) |
static <T> ObservableTransformer<Buffer,T> |
unmarshaller(TypeReference<T> mappedTypeRef) |
static <T> ObservableTransformer<Buffer,T> |
unmarshaller(TypeReference<T> mappedTypeRef,
ObjectCodec mapper) |
public static <T> ReadStream<T> toReadStream(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> 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> Observable<U> toObservable(ReadStream<T> stream, java.util.function.Function<T,U> mapping)
toObservable(ReadStream)
but with a mapping
functionpublic static <T> ObservableTransformer<Buffer,T> unmarshaller(Class<T> mappedType)
public static <T> ObservableTransformer<Buffer,T> unmarshaller(TypeReference<T> mappedTypeRef)
public static <T> ObservableTransformer<Buffer,T> unmarshaller(Class<T> mappedType, ObjectCodec mapper)
public static <T> ObservableTransformer<Buffer,T> unmarshaller(TypeReference<T> mappedTypeRef, ObjectCodec mapper)
Copyright © 2024 Eclipse. All rights reserved.