Top Description Methods
org.springframework.web.service.invoker

public Interface ReactorHttpExchangeAdapter

extends HttpExchangeAdapter
Known Direct Implementers
org.springframework.web.service.invoker.AbstractReactorHttpExchangeAdapter
Imports
java.time.Duration, reactor.core.publisher.Flux, .Mono, org.springframework.core.ParameterizedTypeReference, .ReactiveAdapterRegistry, org.springframework.http.HttpHeaders, .ResponseEntity, org.springframework.lang.Nullable

Contract to abstract a reactive, HTTP client from HttpServiceProxyFactory and make it pluggable.
Author
Rossen Stoyanchev
Since
6.1

Method Summary

Modifier and TypeMethod and Description
public Mono<ResponseEntity<Void>>
exchangeForBodilessEntityMono(HttpRequestValues requestValues)

Variant of exchangeForMono(HttpRequestValues) with additional access to the response status and headers.

public <
the type the response is decoded to
T
>
Flux<T>

Returns:

Flux with decoded stream elements.
exchangeForBodyFlux
(HttpRequestValues
the request to perform
requestValues
,
ParameterizedTypeReference<T>
the target stream element type to decode to
bodyType
)

Perform the given request and decode the response content to a stream with elements of the given type.

public <
the type the response is decoded to
T
>
Mono<T>

Returns:

Mono that returns the decoded response.
exchangeForBodyMono
(HttpRequestValues
the request to perform
requestValues
,
ParameterizedTypeReference<T>
the target type to decode to
bodyType
)

Perform the given request and decode the response content to the given type.

public <T> Mono<ResponseEntity<Flux<T>>>
exchangeForEntityFlux(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType)

Variant of exchangeForBodyFlux(HttpRequestValues, ParameterizedTypeReference) with additional access to the response status and headers.

public <T> Mono<ResponseEntity<T>>
exchangeForEntityMono(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType)

Variant of exchangeForBodyMono(HttpRequestValues, ParameterizedTypeReference) with additional access to the response status and headers.

public Mono<HttpHeaders>

Returns:

Mono that returns the response headers the request is fully executed and the response content released.
exchangeForHeadersMono
(HttpRequestValues
the request to perform
requestValues
)

Perform the given request, release the response content, and return the response headers.

public Mono<Void>

Returns:

Mono that completes when the request is fully executed and the response content is released.
exchangeForMono
(HttpRequestValues
the request to perform
requestValues
)

Perform the given request, and release the response content, if any.

public Duration
getBlockTimeout()

Return the configured time to block for the response from an HTTP service method with a synchronous (blocking) method signature.

public ReactiveAdapterRegistry
Inherited from org.springframework.web.service.invoker.HttpExchangeAdapter:
exchangeexchangeForBodilessEntityexchangeForBodyexchangeForEntityexchangeForHeaderssupportsRequestAttributes

Method Detail

exchangeForBodilessEntityMonoback to summary
public Mono<ResponseEntity<Void>> exchangeForBodilessEntityMono(HttpRequestValues requestValues)

Variant of exchangeForMono(HttpRequestValues) with additional access to the response status and headers.

exchangeForBodyFluxback to summary
public <T> 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.

Parameters
<T>
the type the response is decoded to
requestValues:HttpRequestValues

the request to perform

bodyType:ParameterizedTypeReference<T>

the target stream element type to decode to

Returns:Flux<T>

Flux with decoded stream elements.

exchangeForBodyMonoback to summary
public <T> Mono<T> exchangeForBodyMono(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType)

Perform the given request and decode the response content to the given type.

Parameters
<T>
the type the response is decoded to
requestValues:HttpRequestValues

the request to perform

bodyType:ParameterizedTypeReference<T>

the target type to decode to

Returns:Mono<T>

Mono that returns the decoded response.

exchangeForEntityFluxback to summary
public <T> Mono<ResponseEntity<Flux<T>>> exchangeForEntityFlux(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType)

Variant of exchangeForBodyFlux(HttpRequestValues, ParameterizedTypeReference) with additional access to the response status and headers.

exchangeForEntityMonoback to summary
public <T> Mono<ResponseEntity<T>> exchangeForEntityMono(HttpRequestValues requestValues, ParameterizedTypeReference<T> bodyType)

Variant of exchangeForBodyMono(HttpRequestValues, ParameterizedTypeReference) with additional access to the response status and headers.

exchangeForHeadersMonoback to summary
public Mono<HttpHeaders> exchangeForHeadersMono(HttpRequestValues requestValues)

Perform the given request, release the response content, and return the response headers.

Parameters
requestValues:HttpRequestValues

the request to perform

Returns:Mono<HttpHeaders>

Mono that returns the response headers the request is fully executed and the response content released.

exchangeForMonoback to summary
public Mono<Void> exchangeForMono(HttpRequestValues requestValues)

Perform the given request, and release the response content, if any.

Parameters
requestValues:HttpRequestValues

the request to perform

Returns:Mono<Void>

Mono that completes when the request is fully executed and the response content is released.

getBlockTimeoutback to summary
public Duration 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.

Annotations
@Nullable
getReactiveAdapterRegistryback to summary
public ReactiveAdapterRegistry getReactiveAdapterRegistry()

Return the configured ReactiveAdapterRegistry.