Package com.shri.restinpeace.reactor
Class FluxListCallAdapterFactory
java.lang.Object
com.shri.restinpeace.reactor.FluxListCallAdapterFactory
- All Implemented Interfaces:
CallAdapterFactory
Claims a plain (non-
@Paginated) Flux<T>-returning
@RestClient method - "flavor 1" of Flux<T> support
(§7.1): decodes the response body as List<T> (RIP's existing
generic-collection decoding, E9/E12) then emits it item-by-item via
Flux.fromIterable(java.lang.Iterable<? extends T>). There's no real backpressure here - the whole
list is already decoded in memory before this adapter ever runs, so this
flavor is a convenience for a consumer already writing Reactor-style
pipelines, not a memory-efficiency feature. See
FluxPaginatedCallAdapterFactory ("flavor 2") for the one that
actually earns backpressure through real page-at-a-time fetching.
Declines a @Paginated method (§7.3): both flavors declare
the same Flux<T> return type, so return type alone can't
disambiguate them - @Paginated's presence is the signal
RequestExecutor already uses (a @Paginated method is
routed to pagination-aware dispatch before any CallAdapterFactory
resolution even runs), so this factory declines outright rather than ever
racing FluxPaginatedCallAdapterFactory for the same method.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FluxListCallAdapterFactory
public FluxListCallAdapterFactory()
-
-
Method Details
-
get
- Specified by:
getin interfaceCallAdapterFactory
-