Package nl.knaw.dans.lib.util
Class ClientProxyBuilder<A,D>
java.lang.Object
nl.knaw.dans.lib.util.ClientProxyBuilder<A,D>
- Type Parameters:
A
- the ApiClient class, that serves as an intermediary between the proxy and the underlying HTTP clientD
- the proxy class used by the application to call specific endpoints
Builder for creating a client proxy for an API endpoint. This is some boilerplate code that is needed to connect the http client (e.g. Jersey) to the classes generated by OpenAPI Generator.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
defaultApiCtor
(Function<A, D> defaultApiCtor) httpClient
(io.dropwizard.client.JerseyClientConfiguration httpClient)
-
Constructor Details
-
ClientProxyBuilder
public ClientProxyBuilder()
-
-
Method Details
-
apiClient
-
basePath
-
httpClient
public ClientProxyBuilder<A,D> httpClient(io.dropwizard.client.JerseyClientConfiguration httpClient) -
defaultApiCtor
-
build
-