public interface ReactiveAdapter
Flux
and Mono
.
An adapter supports a specific adaptee type whose stream semantics
can be checked via getDescriptor()
.
Use the ReactiveAdapterRegistry
to obtain an adapter for a
supported adaptee type or to register additional adapters.
Modifier and Type | Interface and Description |
---|---|
static class |
ReactiveAdapter.Descriptor
A descriptor with information about the adaptee stream semantics.
|
Modifier and Type | Method and Description |
---|---|
Object |
fromPublisher(org.reactivestreams.Publisher<?> publisher)
Adapt the given Publisher to the target adaptee.
|
ReactiveAdapter.Descriptor |
getDescriptor()
Return a descriptor with further information about the adaptee.
|
<T> reactor.core.publisher.Flux<T> |
toFlux(Object source)
Adapt the given Object to a
Flux . |
<T> reactor.core.publisher.Mono<T> |
toMono(Object source)
Adapt the given Object to a
Mono |
<T> org.reactivestreams.Publisher<T> |
toPublisher(Object source)
Adapt the given Object to a Publisher.
|
ReactiveAdapter.Descriptor getDescriptor()
<T> reactor.core.publisher.Mono<T> toMono(Object source)
Mono
source
- the source object to adaptMono
possibly empty<T> reactor.core.publisher.Flux<T> toFlux(Object source)
Flux
.source
- the source object to adaptFlux
possibly empty<T> org.reactivestreams.Publisher<T> toPublisher(Object source)
source
- the source object to adaptMono
or Flux
possibly emptyObject fromPublisher(org.reactivestreams.Publisher<?> publisher)
publisher
- the publisher to adapt