Publisher to and from an async/reactive
type such as CompletableFuture, RxJava Observable, and others.
An adapter is typically obtained via ReactiveAdapterRegistry.
| Modifier and Type | Field and Description |
|---|---|
| private final ReactiveTypeDescriptor | |
| private final Function | |
| private final Function |
| Access | Constructor and Description |
|---|---|
| public | ReactiveAdapter(ReactiveTypeDescriptor
the reactive type descriptor descriptor, Function<Object, Publisher<?>> adapter to a Publisher toPublisherFunction, Function<Publisher<?>, Object> adapter from a Publisher fromPublisherFunction)Constructor for an adapter with functions to convert the target reactive or async type to and from a Reactive Streams Publisher. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: the reactive type instance representing the adapted publisherthe publisher to adapt from publisher)Adapt from the given Reactive Streams Publisher. |
| public ReactiveTypeDescriptor | |
| public Class | |
| public boolean | |
| public boolean | |
| public boolean | |
| public <T> Publisher | Returns: the Publisher representing the adaptationthe source object to adapt from; if the given object is
source)null, ReactiveTypeDescriptor#getEmptyValue() is used.Adapt the given instance to a Reactive Streams |
| descriptor | back to summary |
|---|---|
| private final ReactiveTypeDescriptor descriptor | |
| fromPublisherFunction | back to summary |
|---|---|
| private final Function<Publisher<?>, Object> fromPublisherFunction | |
| toPublisherFunction | back to summary |
|---|---|
| private final Function<Object, Publisher<?>> toPublisherFunction | |
| ReactiveAdapter | back to summary |
|---|---|
| public ReactiveAdapter(ReactiveTypeDescriptor descriptor, Function<Object, Publisher<?>> toPublisherFunction, Function<Publisher<?>, Object> fromPublisherFunction) Constructor for an adapter with functions to convert the target reactive or async type to and from a Reactive Streams Publisher. | |
| fromPublisher | back to summary |
|---|---|
| public Object fromPublisher(Publisher<?> publisher) Adapt from the given Reactive Streams Publisher. | |
| getDescriptor | back to summary |
|---|---|
| public ReactiveTypeDescriptor getDescriptor() Return the descriptor of the reactive type for the adapter. | |
| getReactiveType | back to summary |
|---|---|
| public Class Shortcut for | |
| isMultiValue | back to summary |
|---|---|
| public boolean isMultiValue() Shortcut for | |
| isNoValue | back to summary |
|---|---|
| public boolean isNoValue() Shortcut for | |
| supportsEmpty | back to summary |
|---|---|
| public boolean supportsEmpty() Shortcut for | |
| toPublisher | back to summary |
|---|---|
| public <T> Publisher Adapt the given instance to a Reactive Streams
| |