Class FeignClientFactory
java.lang.Object
org.deltafi.common.http.client.feign.FeignClientFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TBuilds a client for the provided Feign-annotated interface for the resources at the given URL.static <T> Tbuild(Class<T> targetClass, String url, SSLContext sslContext) Builds an SSL-enabled client for the provided Feign-annotated interface for the resources at the given URL.static <T> Tbuild(Class<T> targetClass, String url, SSLContext sslContext, feign.Retryer retryer) Builds an SSL-enabled client for the provided Feign-annotated interface for the resources at the given URL.
-
Constructor Details
-
FeignClientFactory
public FeignClientFactory()
-
-
Method Details
-
build
Builds a client for the provided Feign-annotated interface for the resources at the given URL.- Type Parameters:
T- the interface type- Parameters:
targetClass- the Feign-annotated interface classurl- the URL the client will access- Returns:
- a Feign-generated instance of the provided interface for accessing the given URL
-
build
Builds an SSL-enabled client for the provided Feign-annotated interface for the resources at the given URL.- Type Parameters:
T- the interface type- Parameters:
targetClass- the Feign-annotated interface classurl- the URL the client will accesssslContext- the SSLContext to use for creating an SSL connection to the given URL- Returns:
- a Feign-generated instance of the provided interface for accessing the given URL
-
build
public static <T> T build(Class<T> targetClass, String url, SSLContext sslContext, feign.Retryer retryer) Builds an SSL-enabled client for the provided Feign-annotated interface for the resources at the given URL.- Type Parameters:
T- the interface type- Parameters:
targetClass- the Feign-annotated interface classurl- the URL the client will accesssslContext- the SSLContext to use for creating an SSL connection to the given URLretryer- the retry settings for this Feign client- Returns:
- a Feign-generated instance of the provided interface for accessing the given URL
-