接口 ReactorHttpExchangeAdapter

所有超级接口:
HttpExchangeAdapter
所有已知实现类:
AbstractReactorHttpExchangeAdapter, WebClientAdapter

public interface ReactorHttpExchangeAdapter extends HttpExchangeAdapter
Contract to abstract a reactive, HTTP client from HttpServiceProxyFactory and make it pluggable.
从以下版本开始:
4.0
作者:
Rossen Stoyanchev, Harry Yang
  • 方法详细资料

    • getReactiveAdapterRegistry

      cn.taketoday.core.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.
      参数:
      requestValues - the request to perform
      返回:
      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.
      参数:
      requestValues - the request to perform
      返回:
      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, cn.taketoday.core.ParameterizedTypeReference<T> bodyType)
      Perform the given request and decode the response content to the given type.
      类型参数:
      T - the type the response is decoded to
      参数:
      requestValues - the request to perform
      bodyType - the target type to decode to
      返回:
      Mono that returns the decoded response.
    • exchangeForBodyFlux

      <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 - the type the response is decoded to
      参数:
      requestValues - the request to perform
      bodyType - the target stream element type to decode to
      返回:
      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, cn.taketoday.core.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, cn.taketoday.core.ParameterizedTypeReference<T> bodyType)
      Variant of exchangeForBodyFlux(HttpRequestValues, ParameterizedTypeReference) with additional access to the response status and headers.