Class HttpServiceProxyFactory.Builder
java.lang.Object
org.springframework.web.service.invoker.HttpServiceProxyFactory.Builder
- Enclosing class:
- HttpServiceProxyFactory
Builder to create an
HttpServiceProxyFactory
.-
Method Summary
Modifier and TypeMethodDescriptionblockTimeout
(Duration blockTimeout) Configure how long to block for the response of an HTTP service method with a synchronous (blocking) method signature.build()
Build theHttpServiceProxyFactory
instance.clientAdapter
(HttpClientAdapter clientAdapter) Provide the HTTP client to perform requests through.conversionService
(ConversionService conversionService) Set theConversionService
to use where input values need to be formatted as Strings.Register a custom argument resolver, invoked ahead of default resolvers.embeddedValueResolver
(StringValueResolver embeddedValueResolver) Set theStringValueResolver
to use for resolving placeholders and expressions embedded inHttpExchange.url()
.Set theReactiveAdapterRegistry
to use to support different asynchronous types for HTTP service method return values.
-
Method Details
-
clientAdapter
Provide the HTTP client to perform requests through.- Parameters:
clientAdapter
- a client adapted toHttpClientAdapter
- Returns:
- this same builder instance
-
customArgumentResolver
Register a custom argument resolver, invoked ahead of default resolvers.- Parameters:
resolver
- the resolver to add- Returns:
- this same builder instance
-
conversionService
Set theConversionService
to use where input values need to be formatted as Strings.By default this is
DefaultFormattingConversionService
.- Returns:
- this same builder instance
-
embeddedValueResolver
public HttpServiceProxyFactory.Builder embeddedValueResolver(StringValueResolver embeddedValueResolver) Set theStringValueResolver
to use for resolving placeholders and expressions embedded inHttpExchange.url()
.- Parameters:
embeddedValueResolver
- the resolver to use- Returns:
- this same builder instance
-
reactiveAdapterRegistry
Set theReactiveAdapterRegistry
to use to support different asynchronous types for HTTP service method return values.By default this is
ReactiveAdapterRegistry.getSharedInstance()
.- Returns:
- 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.
- Parameters:
blockTimeout
- the timeout value- Returns:
- this same builder instance
-
build
Build theHttpServiceProxyFactory
instance.
-