@HttpExchange methods.
To create an instance, use static methods to obtain a
Builder.
org.springframework.web.client.support.RestClientAdapter , org.springframework.web.reactive.function.client.support.WebClientAdapter , org.springframework.web.client.support.RestTemplateAdapter
| Modifier and Type | Class and Description |
|---|---|
| public static class | HttpServiceProxyFactory.Builder
Builder to create an |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final StringValueResolver | |
| private final HttpExchangeAdapter |
| Access | Constructor and Description |
|---|---|
| private | HttpServiceProxyFactory(HttpExchangeAdapter exchangeAdapter, List<HttpServiceArgumentResolver> argumentResolvers, StringValueResolver embeddedValueResolver)
|
| Modifier and Type | Method and Description |
|---|---|
| public static HttpServiceProxyFactory. | builder(HttpClientAdapter clientAdapter)
Deprecated
for removal since 6.1. in favor of
Return a builder that's initialized with the given client.
builderFor(HttpExchangeAdapter);
to be removed in 6.2.
|
| public static HttpServiceProxyFactory. | |
| public static HttpServiceProxyFactory. | builderFor(HttpExchangeAdapter exchangeAdapter)
Return a builder that's initialized with the given client. |
| public < the HTTP service type S> S | Returns: the created proxythe HTTP service to create a proxy for serviceType)Return a proxy that implements the given HTTP service interface to perform HTTP requests and retrieve responses through an HTTP client. |
| private <S> HttpServiceMethod | |
| private boolean |
| argumentResolvers | back to summary |
|---|---|
| private final List<HttpServiceArgumentResolver> argumentResolvers | |
| embeddedValueResolver | back to summary |
|---|---|
| private final StringValueResolver embeddedValueResolver
| |
| exchangeAdapter | back to summary |
|---|---|
| private final HttpExchangeAdapter exchangeAdapter | |
| HttpServiceProxyFactory | back to summary |
|---|---|
| private HttpServiceProxyFactory(HttpExchangeAdapter exchangeAdapter, List<HttpServiceArgumentResolver> argumentResolvers, StringValueResolver embeddedValueResolver) | |
| builder | back to summary |
|---|---|
| public static HttpServiceProxyFactory. Return a builder that's initialized with the given client.
| |
| builder | back to summary |
|---|---|
| public static HttpServiceProxyFactory. Return an empty builder, with the client to be provided to builder. | |
| builderFor | back to summary |
|---|---|
| public static HttpServiceProxyFactory. Return a builder that's initialized with the given client.
| |
| createClient | back to summary |
|---|---|
| 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.
| |
| createHttpServiceMethod | back to summary |
|---|---|
| private <S> HttpServiceMethod createHttpServiceMethod(Class<S> serviceType, Method method) | |
| isExchangeMethod | back to summary |
|---|---|
| private boolean isExchangeMethod(Method method) | |
HttpServiceProxyFactory.
| Modifier and Type | Field and Description |
|---|---|
| private ConversionService | |
| private final List | |
| private StringValueResolver | |
| private HttpExchangeAdapter |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public HttpServiceProxyFactory. | Returns: this same builder instancethe timeout value blockTimeout)
Deprecated
for removal since 6.1. in favor of setting the same directly on the
Configure how long to block for the response of an HTTP service method
with a synchronous (blocking) method signature.
HttpExchangeAdapter
|
| public HttpServiceProxyFactory | |
| public HttpServiceProxyFactory. | Returns: this same builder instancea client adapted to clientAdapter)HttpClientAdapter
Deprecated
for removal since 6.1. in favor of
Provide the HTTP client to perform requests through.
exchangeAdapter(HttpExchangeAdapter);
to be removed in 6.2
|
| public HttpServiceProxyFactory. | Returns: this same builder instanceSet the |
| public HttpServiceProxyFactory. | Returns: this same builder instancethe resolver to add resolver)Register a custom argument resolver, invoked ahead of default resolvers. |
| public HttpServiceProxyFactory. | Returns: this same builder instancethe resolver to use embeddedValueResolver)Set the |
| public HttpServiceProxyFactory. | Returns: this same builder instancea client adapted to adapter)HttpExchangeAdapterProvide the HTTP client to perform requests through. |
| private List | |
| public HttpServiceProxyFactory. | Returns: this same builder instance
Deprecated
for removal since 6.1. in favor of setting the same directly on the
Set the HttpExchangeAdapter
ReactiveAdapterRegistry to use to support different
asynchronous types for HTTP service method return values.
|
| conversionService | back to summary |
|---|---|
| private ConversionService conversionService
| |
| customArgumentResolvers | back to summary |
|---|---|
| private final List<HttpServiceArgumentResolver> customArgumentResolvers | |
| embeddedValueResolver | back to summary |
|---|---|
| private StringValueResolver embeddedValueResolver
| |
| exchangeAdapter | back to summary |
|---|---|
| private HttpExchangeAdapter exchangeAdapter
| |
| Builder | back to summary |
|---|---|
| private Builder() | |
| blockTimeout | back to summary |
|---|---|
| public HttpServiceProxyFactory. 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.
| |
| build | back to summary |
|---|---|
| public HttpServiceProxyFactory build() Build the | |
| clientAdapter | back to summary |
|---|---|
| public HttpServiceProxyFactory. Deprecated for removal since 6.1. in favor of Provide the HTTP client to perform requests through.
| |
| conversionService | back to summary |
|---|---|
| public HttpServiceProxyFactory. Set the By default this is
| |
| customArgumentResolver | back to summary |
|---|---|
| public HttpServiceProxyFactory. Register a custom argument resolver, invoked ahead of default resolvers.
| |
| embeddedValueResolver | back to summary |
|---|---|
| public HttpServiceProxyFactory. Set the
| |
| exchangeAdapter | back to summary |
|---|---|
| public HttpServiceProxyFactory. Provide the HTTP client to perform requests through.
| |
| initArgumentResolvers | back to summary |
|---|---|
private List
| |
| reactiveAdapterRegistry | back to summary |
|---|---|
| public HttpServiceProxyFactory. Set the By default this is
| |
MethodInterceptor that invokes an HttpServiceMethod.
| Modifier and Type | Field and Description |
|---|---|
| private final Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Object | invoke(MethodInvocation
the method invocation joinpoint invocation)Implements org. |
| private static Object[] |
| httpServiceMethods | back to summary |
|---|---|
| private final Map<Method, HttpServiceMethod> httpServiceMethods | |
| HttpServiceMethodInterceptor | back to summary |
|---|---|
| private HttpServiceMethodInterceptor(List<HttpServiceMethod> methods) | |
| invoke | back to summary |
|---|---|
| public Object invoke(MethodInvocation invocation) throws Throwable Implements org. Doc from org. Implement this method to perform extra treatments before and
after the invocation. Polite implementations would certainly
like to invoke
| |
| resolveCoroutinesArguments | back to summary |
|---|---|
| private static Object[] resolveCoroutinesArguments(Object[] args) | |