Interface ReactorHttpExchangeAdapter

All Superinterfaces:
HttpExchangeAdapter
All Known Implementing Classes:
AbstractReactorHttpExchangeAdapter, WebClientAdapter

public interface ReactorHttpExchangeAdapter extends HttpExchangeAdapter
Contract to abstract a reactive, HTTP client from HttpServiceProxyFactory and make it pluggable.
Since:
6.1
Author:
Rossen Stoyanchev
  • Method Details

    • getReactiveAdapterRegistry

      ReactiveAdapterRegistry getReactiveAdapterRegistry()
      Return the configured ReactiveAdapterRegistry.
    • getBlockTimeout

      @Nullable 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.

    • exchangeForMono

      reactor.core.publisher.Mono<Void> exchangeForMono(HttpRequestValues requestValues)
      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

      reactor.core.publisher.Mono<HttpHeaders> exchangeForHeadersMono(HttpRequestValues requestValues)
      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 perform
      bodyType - 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 perform
      bodyType - 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 of exchangeForMono(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 of exchangeForBodyMono(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 of exchangeForBodyFlux(HttpRequestValues, ParameterizedTypeReference) with additional access to the response status and headers.