Package org.springframework.web.service.invoker

# Class HttpServiceProxyFactory

java.lang.Object
org.springframework.web.service.invoker.HttpServiceProxyFactory

public final class HttpServiceProxyFactory extends Object
Factory to create a client proxy from an HTTP service interface with `@HttpExchange` methods.

To create an instance, use static methods to obtain a `Builder`.

Since:
  6.0
Author:
  Rossen Stoyanchev
See Also:
  - `RestClientAdapter`
  - `org.springframework.web.reactive.function.client.support.WebClientAdapter`
  - `RestTemplateAdapter`

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`HttpServiceProxyFactory.Builder`
Builder to create an `HttpServiceProxyFactory`.

## Method Summary

Modifier and Type
Method
Description
`static HttpServiceProxyFactory.Builder`
`builder()`
Return an empty builder, with the client to be provided to builder.
`static HttpServiceProxyFactory.Builder`
`builderFor(HttpExchangeAdapter exchangeAdapter)`
Return a builder that's initialized with the given client.
`<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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### 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.

Type Parameters:
  `S` - the HTTP service type
Parameters:
  `serviceType` - the HTTP service to create a proxy for
Returns:
  the created proxy

### builderFor

public static HttpServiceProxyFactory.Builder builderFor(HttpExchangeAdapter exchangeAdapter)
Return a builder that's initialized with the given client.

Since:
  6.1

### builder

public static HttpServiceProxyFactory.Builder builder()
Return an empty builder, with the client to be provided to builder.