Interface ReactorHttpExchangeAdapter
- All Superinterfaces:
HttpExchangeAdapter
- All Known Implementing Classes:
AbstractReactorHttpExchangeAdapter
,WebClientAdapter
Contract to abstract a reactive, HTTP client from
HttpServiceProxyFactory and make it pluggable.
- Since:
- 6.1
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<ResponseEntity<Void>>
exchangeForBodilessEntityMono
(HttpRequestValues requestValues) Variant ofexchangeForMono(HttpRequestValues)
with additional access to the response status and headers.<T> reactor.core.publisher.Flux<T>
exchangeForBodyFlux
(HttpRequestValues requestValues, 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, 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, ParameterizedTypeReference<T> bodyType) Variant ofexchangeForBodyFlux(HttpRequestValues, ParameterizedTypeReference)
with additional access to the response status and headers.<T> reactor.core.publisher.Mono<ResponseEntity<T>>
exchangeForEntityMono
(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType) Variant ofexchangeForBodyMono(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.Return the configured time to block for the response from an HTTP service method with a synchronous (blocking) method signature.Return the configuredReactiveAdapterRegistry
.Methods inherited from interface org.springframework.web.service.invoker.HttpExchangeAdapter
exchange, exchangeForBodilessEntity, exchangeForBody, exchangeForEntity, exchangeForHeaders, supportsRequestAttributes
-
Method Details
-
getReactiveAdapterRegistry
ReactiveAdapterRegistry getReactiveAdapterRegistry()Return the configuredReactiveAdapterRegistry
. -
getBlockTimeout
Return the configured time to block for the response from an HTTP service method with a synchronous (blocking) method signature.By default, not set in which case the behavior depends on connection and request timeout settings of the underlying HTTP client. We recommend configuring timeout values directly on the underlying HTTP client, which provides more control over such settings.
-
exchangeForMono
Perform the given request, and release the response content, if any.- Parameters:
requestValues
- the request to perform- Returns:
Mono
that completes when the request is fully executed and the response content is released.
-
exchangeForHeadersMono
Perform the given request, release the response content, and return the response headers.- Parameters:
requestValues
- the request to perform- Returns:
Mono
that returns the response headers the request is fully executed and the response content released.
-
exchangeForBodyMono
<T> reactor.core.publisher.Mono<T> exchangeForBodyMono(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType) Perform the given request and decode the response content to the given type.- Type Parameters:
T
- the type the response is decoded to- Parameters:
requestValues
- the request to performbodyType
- the target type to decode to- Returns:
Mono
that returns the decoded response.
-
exchangeForBodyFlux
<T> reactor.core.publisher.Flux<T> exchangeForBodyFlux(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType) Perform the given request and decode the response content to a stream with elements of the given type.- Type Parameters:
T
- the type the response is decoded to- Parameters:
requestValues
- the request to performbodyType
- the target stream element type to decode to- Returns:
Flux
with decoded stream elements.
-
exchangeForBodilessEntityMono
reactor.core.publisher.Mono<ResponseEntity<Void>> exchangeForBodilessEntityMono(HttpRequestValues requestValues) Variant ofexchangeForMono(HttpRequestValues)
with additional access to the response status and headers. -
exchangeForEntityMono
<T> reactor.core.publisher.Mono<ResponseEntity<T>> exchangeForEntityMono(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType) Variant ofexchangeForBodyMono(HttpRequestValues, ParameterizedTypeReference)
with additional access to the response status and headers. -
exchangeForEntityFlux
<T> reactor.core.publisher.Mono<ResponseEntity<reactor.core.publisher.Flux<T>>> exchangeForEntityFlux(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType) Variant ofexchangeForBodyFlux(HttpRequestValues, ParameterizedTypeReference)
with additional access to the response status and headers.
-