类 HttpServiceProxyFactory.Builder
java.lang.Object
cn.taketoday.web.service.invoker.HttpServiceProxyFactory.Builder
Builder to create an
HttpServiceProxyFactory.-
字段概要
字段修饰符和类型字段说明private cn.taketoday.core.conversion.ConversionServiceprivate final List<HttpServiceArgumentResolver>private cn.taketoday.core.StringValueResolverprivate HttpExchangeAdapter -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明blockTimeout(Duration blockTimeout) Configure how long to block for the response of an HTTP service method with a synchronous (blocking) method signature.build()Build theHttpServiceProxyFactoryinstance.conversionService(cn.taketoday.core.conversion.ConversionService conversionService) Set theConversionServiceto use where input values need to be formatted as Strings.<S> ScreateClient(Class<S> serviceType) Return a proxy that implements the given HTTP service interface to perform HTTP requests and retrieve responses through an HTTP client.Register a custom argument resolver, invoked ahead of default resolvers.embeddedValueResolver(cn.taketoday.core.StringValueResolver embeddedValueResolver) Set theStringValueResolverto use for resolving placeholders and expressions embedded inHttpExchange.url().exchangeAdapter(HttpExchangeAdapter adapter) Provide the HTTP client to perform requests through.private List<HttpServiceArgumentResolver>reactiveAdapterRegistry(cn.taketoday.core.ReactiveAdapterRegistry registry) Set theReactiveAdapterRegistryto use to support different asynchronous types for HTTP service method return values.
-
字段详细资料
-
exchangeAdapter
-
customArgumentResolvers
-
conversionService
@Nullable private cn.taketoday.core.conversion.ConversionService conversionService -
embeddedValueResolver
@Nullable private cn.taketoday.core.StringValueResolver embeddedValueResolver
-
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
exchangeAdapter
Provide the HTTP client to perform requests through.- 参数:
adapter- a client adapted toHttpExchangeAdapter- 返回:
- this same builder instance
-
customArgumentResolver
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 theConversionServiceto 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 theStringValueResolverto use for resolving placeholders and expressions embedded inHttpExchange.url().- 参数:
embeddedValueResolver- the resolver to use- 返回:
- this same builder instance
-
reactiveAdapterRegistry
public HttpServiceProxyFactory.Builder reactiveAdapterRegistry(cn.taketoday.core.ReactiveAdapterRegistry registry) Set theReactiveAdapterRegistryto use to support different asynchronous types for HTTP service method return values.By default this is
ReactiveAdapterRegistry.getSharedInstance().- 返回:
- this same builder instance
-
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
Build theHttpServiceProxyFactoryinstance. -
createClient
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
-