类 HttpServiceProxyFactory.Builder

java.lang.Object
cn.taketoday.web.service.invoker.HttpServiceProxyFactory.Builder
封闭类:
HttpServiceProxyFactory

public static final class HttpServiceProxyFactory.Builder extends Object
Builder to create an HttpServiceProxyFactory.
  • 字段详细资料

    • exchangeAdapter

      @Nullable private HttpExchangeAdapter exchangeAdapter
    • customArgumentResolvers

      private final List<HttpServiceArgumentResolver> customArgumentResolvers
    • conversionService

      @Nullable private cn.taketoday.core.conversion.ConversionService conversionService
    • embeddedValueResolver

      @Nullable private cn.taketoday.core.StringValueResolver embeddedValueResolver
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • exchangeAdapter

      public HttpServiceProxyFactory.Builder exchangeAdapter(HttpExchangeAdapter adapter)
      Provide the HTTP client to perform requests through.
      参数:
      adapter - a client adapted to HttpExchangeAdapter
      返回:
      this same builder instance
    • customArgumentResolver

      public HttpServiceProxyFactory.Builder customArgumentResolver(HttpServiceArgumentResolver resolver)
      Register a custom argument resolver, invoked ahead of default resolvers.
      参数:
      resolver - the resolver to add
      返回:
      this same builder instance
    • conversionService

      public HttpServiceProxyFactory.Builder conversionService(cn.taketoday.core.conversion.ConversionService conversionService)
      Set the ConversionService to use where input values need to be formatted as Strings.

      By default this is DefaultFormattingConversionService.

      返回:
      this same builder instance
    • embeddedValueResolver

      public HttpServiceProxyFactory.Builder embeddedValueResolver(cn.taketoday.core.StringValueResolver embeddedValueResolver)
      Set the StringValueResolver to use for resolving placeholders and expressions embedded in HttpExchange.url().
      参数:
      embeddedValueResolver - the resolver to use
      返回:
      this same builder instance
    • reactiveAdapterRegistry

      public HttpServiceProxyFactory.Builder reactiveAdapterRegistry(cn.taketoday.core.ReactiveAdapterRegistry registry)
      Set the ReactiveAdapterRegistry to use to support different asynchronous types for HTTP service method return values.

      By default this is ReactiveAdapterRegistry.getSharedInstance().

      返回:
      this same builder instance
    • blockTimeout

      public HttpServiceProxyFactory.Builder blockTimeout(@Nullable Duration blockTimeout)
      Configure how long to block for the response of an HTTP service method with a synchronous (blocking) method signature.

      By default this is 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.

      参数:
      blockTimeout - the timeout value
      返回:
      this same builder instance
    • build

      public HttpServiceProxyFactory build()
      Build the HttpServiceProxyFactory instance.
    • createClient

      public <S> S createClient(Class<S> serviceType)
      Return a proxy that implements the given HTTP service interface to perform HTTP requests and retrieve responses through an HTTP client.
      类型参数:
      S - the HTTP service type
      参数:
      serviceType - the HTTP service to create a proxy for
      返回:
      the created proxy
    • initArgumentResolvers

      private List<HttpServiceArgumentResolver> initArgumentResolvers()