Class WebClientAdapter
java.lang.Object
org.springframework.web.service.invoker.AbstractReactorHttpExchangeAdapter
org.springframework.web.reactive.function.client.support.WebClientAdapter
- All Implemented Interfaces:
org.springframework.web.service.invoker.HttpExchangeAdapter, org.springframework.web.service.invoker.ReactorHttpExchangeAdapter
public final class WebClientAdapter
extends org.springframework.web.service.invoker.AbstractReactorHttpExchangeAdapter
ReactorHttpExchangeAdapter that enables an HttpServiceProxyFactory
to use WebClient for request execution.
Use static factory methods in this class to create an
HttpServiceProxyFactory configured with a given WebClient.
- Since:
- 6.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionstatic WebClientAdapterCreate aWebClientAdapterfor the givenWebClientinstance.exchangeForBodilessEntityMono(org.springframework.web.service.invoker.HttpRequestValues requestValues) <T> Flux<T> exchangeForBodyFlux(org.springframework.web.service.invoker.HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType) <T> Mono<T> exchangeForBodyMono(org.springframework.web.service.invoker.HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType) exchangeForEntityFlux(org.springframework.web.service.invoker.HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType) <T> Mono<org.springframework.http.ResponseEntity<T>> exchangeForEntityMono(org.springframework.web.service.invoker.HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType) Mono<org.springframework.http.HttpHeaders> exchangeForHeadersMono(org.springframework.web.service.invoker.HttpRequestValues requestValues) exchangeForMono(org.springframework.web.service.invoker.HttpRequestValues requestValues) booleanMethods inherited from class org.springframework.web.service.invoker.AbstractReactorHttpExchangeAdapter
exchange, exchangeForBodilessEntity, exchangeForBody, exchangeForEntity, exchangeForHeaders, getBlockTimeout, getReactiveAdapterRegistry, setBlockTimeout, setReactiveAdapterRegistry
-
Method Details
-
supportsRequestAttributes
public boolean supportsRequestAttributes() -
exchangeForMono
-
exchangeForHeadersMono
public Mono<org.springframework.http.HttpHeaders> exchangeForHeadersMono(org.springframework.web.service.invoker.HttpRequestValues requestValues) -
exchangeForBodyMono
public <T> Mono<T> exchangeForBodyMono(org.springframework.web.service.invoker.HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType) -
exchangeForBodyFlux
public <T> Flux<T> exchangeForBodyFlux(org.springframework.web.service.invoker.HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType) -
exchangeForBodilessEntityMono
-
exchangeForEntityMono
public <T> Mono<org.springframework.http.ResponseEntity<T>> exchangeForEntityMono(org.springframework.web.service.invoker.HttpRequestValues requestValues, org.springframework.core.ParameterizedTypeReference<T> bodyType) -
exchangeForEntityFlux
-
create
Create aWebClientAdapterfor the givenWebClientinstance.- Parameters:
webClient- the client to use- Returns:
- the created adapter instance
- Since:
- 6.1
-