Package com.shri.restinpeace
Interface CallAdapterFactory
public interface CallAdapterFactory
Recognizes a method's declared return type and produces a
CallAdapter for it, or declines. Registered via
RIP.addCallAdapterFactory(CallAdapterFactory); every registered
factory is consulted, in registration order, and the first non-empty
Optional wins - mirroring
RequestInterceptor's own
"registration order matters" convention. See
docs/design/reactor-call-adapter.md ยง5.-
Method Summary
-
Method Details
-
get
- Parameters:
method- the interface method being dispatched or, atRIP.getClient(...)time, validated -ReflectiveRestClientValidatorcalls this exact method to check a claimed adapter's declared return type before the client is ever built, so a factory must behave identically both times for the same method- Returns:
- an adapter for
method's return type, orOptional.empty()to decline. RIP's own built-in shapes (CompletableFuture,RipResponse,byte[],File) are handled first and always win - a factory is only ever consulted for a return type none of those already claim, so declaring one of them here has no effect. Declining also lets RIP try the next registered factory, in registration order.
-