类 WebClientAdapter
java.lang.Object
cn.taketoday.web.service.invoker.AbstractReactorHttpExchangeAdapter
cn.taketoday.web.reactive.function.client.support.WebClientAdapter
- 所有已实现的接口:
HttpExchangeAdapter,ReactorHttpExchangeAdapter
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.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Harry Yang
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明reactor.core.publisher.Mono<ResponseEntity<Void>>exchangeForBodilessEntityMono(HttpRequestValues requestValues) Variant ofReactorHttpExchangeAdapter.exchangeForMono(HttpRequestValues)with additional access to the response status and headers.<T> reactor.core.publisher.Flux<T>exchangeForBodyFlux(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) Perform the given request and decode the response content to a stream with elements of the given type.<T> reactor.core.publisher.Mono<T>exchangeForBodyMono(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) Perform the given request and decode the response content to the given type.<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>>exchangeForEntityFlux(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) Variant ofReactorHttpExchangeAdapter.exchangeForBodyFlux(HttpRequestValues, ParameterizedTypeReference)with additional access to the response status and headers.<T> reactor.core.publisher.Mono<ResponseEntity<T>>exchangeForEntityMono(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) Variant ofReactorHttpExchangeAdapter.exchangeForBodyMono(HttpRequestValues, ParameterizedTypeReference)with additional access to the response status and headers.reactor.core.publisher.Mono<HttpHeaders>exchangeForHeadersMono(HttpRequestValues requestValues) Perform the given request, release the response content, and return the response headers.reactor.core.publisher.Mono<Void>exchangeForMono(HttpRequestValues requestValues) Perform the given request, and release the response content, if any.static WebClientAdapterCreate aWebClientAdapterfor the givenWebClientinstance.private WebClient.RequestBodySpecnewRequest(HttpRequestValues requestValues) booleanWhether the underlying client supports use of request attributes.从类继承的方法 cn.taketoday.web.service.invoker.AbstractReactorHttpExchangeAdapter
exchange, exchangeForBodilessEntity, exchangeForBody, exchangeForEntity, exchangeForHeaders, getBlockTimeout, getReactiveAdapterRegistry, setBlockTimeout, setReactiveAdapterRegistry
-
字段详细资料
-
webClient
-
-
构造器详细资料
-
WebClientAdapter
Package private constructor. See static factory methods.
-
-
方法详细资料
-
supportsRequestAttributes
public boolean supportsRequestAttributes()从接口复制的说明:HttpExchangeAdapterWhether the underlying client supports use of request attributes. -
exchangeForMono
从接口复制的说明:ReactorHttpExchangeAdapterPerform the given request, and release the response content, if any.- 参数:
requestValues- the request to perform- 返回:
Monothat completes when the request is fully executed and the response content is released.
-
exchangeForHeadersMono
public reactor.core.publisher.Mono<HttpHeaders> exchangeForHeadersMono(HttpRequestValues requestValues) 从接口复制的说明:ReactorHttpExchangeAdapterPerform the given request, release the response content, and return the response headers.- 参数:
requestValues- the request to perform- 返回:
Monothat returns the response headers the request is fully executed and the response content released.
-
exchangeForBodyMono
public <T> reactor.core.publisher.Mono<T> exchangeForBodyMono(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) 从接口复制的说明:ReactorHttpExchangeAdapterPerform the given request and decode the response content to the given type.- 类型参数:
T- the type the response is decoded to- 参数:
requestValues- the request to performbodyType- the target type to decode to- 返回:
Monothat returns the decoded response.
-
exchangeForBodyFlux
public <T> reactor.core.publisher.Flux<T> exchangeForBodyFlux(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) 从接口复制的说明:ReactorHttpExchangeAdapterPerform the given request and decode the response content to a stream with elements of the given type.- 类型参数:
T- the type the response is decoded to- 参数:
requestValues- the request to performbodyType- the target stream element type to decode to- 返回:
Fluxwith decoded stream elements.
-
exchangeForBodilessEntityMono
public reactor.core.publisher.Mono<ResponseEntity<Void>> exchangeForBodilessEntityMono(HttpRequestValues requestValues) 从接口复制的说明:ReactorHttpExchangeAdapterVariant ofReactorHttpExchangeAdapter.exchangeForMono(HttpRequestValues)with additional access to the response status and headers. -
exchangeForEntityMono
public <T> reactor.core.publisher.Mono<ResponseEntity<T>> exchangeForEntityMono(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) 从接口复制的说明:ReactorHttpExchangeAdapterVariant ofReactorHttpExchangeAdapter.exchangeForBodyMono(HttpRequestValues, ParameterizedTypeReference)with additional access to the response status and headers. -
exchangeForEntityFlux
public <T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>> exchangeForEntityFlux(HttpRequestValues requestValues, cn.taketoday.core.ParameterizedTypeReference<T> bodyType) 从接口复制的说明:ReactorHttpExchangeAdapterVariant ofReactorHttpExchangeAdapter.exchangeForBodyFlux(HttpRequestValues, ParameterizedTypeReference)with additional access to the response status and headers. -
newRequest
-
forClient
Create aWebClientAdapterfor the givenWebClientinstance.- 参数:
webClient- the client to use- 返回:
- the created adapter instance
-