Package org.bremersee.apiclient.webflux
Class ReactiveApiClient
- java.lang.Object
-
- org.bremersee.apiclient.ApiClient
-
- org.bremersee.apiclient.webflux.ReactiveApiClient
-
public class ReactiveApiClient extends ApiClient
The reactive api client.- Author:
- Christian Bremer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReactiveApiClient.Builder
The builder.
-
Constructor Summary
Constructors Constructor Description ReactiveApiClient(org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, ReactiveContract contract)
Instantiates a new reactive api client.ReactiveApiClient(org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, ReactiveContract contract, ReactiveErrorHandler errorHandler)
Instantiates a new reactive api client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReactiveApiClient.Builder
builder()
Default api client builder.<T> T
newInstance(Class<T> target, String baseUrl)
Creates new proxy instance.
-
-
-
Constructor Detail
-
ReactiveApiClient
public ReactiveApiClient(org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, ReactiveContract contract)
Instantiates a new reactive api client.- Parameters:
webClientBuilder
- the web client buildercontract
- the contract
-
ReactiveApiClient
public ReactiveApiClient(org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder, ReactiveContract contract, ReactiveErrorHandler errorHandler)
Instantiates a new reactive api client.- Parameters:
webClientBuilder
- the web client buildercontract
- the contracterrorHandler
- the error handler
-
-
Method Detail
-
newInstance
public <T> T newInstance(Class<T> target, String baseUrl)
Description copied from class:ApiClient
Creates new proxy instance.- Specified by:
newInstance
in classApiClient
- Type Parameters:
T
- the api interface type- Parameters:
target
- the targetbaseUrl
- the base url- Returns:
- the proxy
-
builder
public static ReactiveApiClient.Builder builder()
Default api client builder.- Returns:
- the web client proxy builder
-
-