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.static <T> TBuilds a client for the provided Feign-annotated interface for the resources at the given URL.static <T> Tbuild(Class<T> clientClass, String url, feign.codec.Encoder encoder, feign.codec.Decoder decoder, feign.Retryer retryer) Builds a client for the provided Feign-annotated interface for the resources at the given URL.static <T> Tbuild(Class<T> clientClass, String url, feign.codec.Encoder encoder, feign.codec.Decoder decoder, feign.Retryer retryer, feign.Request.Options options) Builds a client for the provided Feign-annotated interface for the resources at the given URL.static <T> Tbuild(Class<T> clientClass, String url, feign.codec.Encoder encoder, feign.codec.Decoder decoder, feign.Retryer retryer, feign.Request.Options options, SslProperties sslProperties) Builds an SSL-enabled client for the provided Feign-annotated interface for the resources at the given URL.static <T> Tbuild(Class<T> clientClass, String url, feign.codec.Encoder encoder, feign.codec.Decoder decoder, feign.Retryer retryer, SslProperties sslProperties) Builds an SSL-enabled client for the provided Feign-annotated interface for the resources at the given URL.static <T> Tbuild(Class<T> clientClass, String url, SslProperties sslProperties) Builds an SSL-enabled client for the provided Feign-annotated interface for the resources at the given URL.static <T> Tbuild(Class<T> clientClass, SslProperties sslProperties) Builds an SSL-enabled client for the provided Feign-annotated interface.
-
Constructor Details
-
FeignClientFactory
public FeignClientFactory()
-
-
Method Details
-
build
Builds a client for the provided Feign-annotated interface. Methods of the interface will accept a URI to access.- Type Parameters:
T- the interface type- Parameters:
clientClass- the Feign-annotated interface class- Returns:
- a Feign-generated instance of the provided interface
-
build
Builds a client for the provided Feign-annotated interface for the resources at the given URL.- Type Parameters:
T- the interface type- Parameters:
clientClass- 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
public static <T> T build(Class<T> clientClass, String url, feign.codec.Encoder encoder, feign.codec.Decoder decoder, feign.Retryer retryer) Builds a client for the provided Feign-annotated interface for the resources at the given URL.- Type Parameters:
T- the interface type- Parameters:
clientClass- the Feign-annotated interface classurl- the URL the client will accessencoder- the encoder used to encode instances to stringsdecoder- the decoder used to decode strings to instancesretryer- the retryer used on failed requests- Returns:
- a Feign-generated instance of the provided interface for accessing the given URL
-
build
public static <T> T build(Class<T> clientClass, String url, feign.codec.Encoder encoder, feign.codec.Decoder decoder, feign.Retryer retryer, feign.Request.Options options) Builds a client for the provided Feign-annotated interface for the resources at the given URL.- Type Parameters:
T- the interface type- Parameters:
clientClass- the Feign-annotated interface classurl- the URL the client will accessencoder- the encoder used to encode instances to stringsdecoder- the decoder used to decode strings to instancesretryer- the retryer used on failed requestsoptions- additional options for requests- Returns:
- a Feign-generated instance of the provided interface for accessing the given URL
-
build
public static <T> T build(Class<T> clientClass, SslProperties sslProperties) throws SslContextFactory.SslException Builds an SSL-enabled client for the provided Feign-annotated interface. Methods of the interface will accept a URI to access.- Type Parameters:
T- the interface type- Parameters:
clientClass- the Feign-annotated interface classsslProperties- the SSL properties used to build an SSL context- Returns:
- a Feign-generated instance of the provided interface
- Throws:
SslContextFactory.SslException
-
build
public static <T> T build(Class<T> clientClass, String url, SslProperties sslProperties) throws SslContextFactory.SslException 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:
clientClass- the Feign-annotated interface classurl- the URL the client will accesssslProperties- the SSL properties used to build an SSL context- Returns:
- a Feign-generated instance of the provided interface for accessing the given URL
- Throws:
SslContextFactory.SslException
-
build
public static <T> T build(Class<T> clientClass, String url, feign.codec.Encoder encoder, feign.codec.Decoder decoder, feign.Retryer retryer, SslProperties sslProperties) throws SslContextFactory.SslException 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:
clientClass- the Feign-annotated interface classurl- the URL the client will accessencoder- the encoder used to encode instances to stringsdecoder- the decoder used to decode strings to instancesretryer- the retryer used on failed requestssslProperties- the SSL properties used to build an SSL context- Returns:
- a Feign-generated instance of the provided interface for accessing the given URL
- Throws:
SslContextFactory.SslException
-
build
public static <T> T build(Class<T> clientClass, String url, feign.codec.Encoder encoder, feign.codec.Decoder decoder, feign.Retryer retryer, feign.Request.Options options, SslProperties sslProperties) throws SslContextFactory.SslException 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:
clientClass- the Feign-annotated interface classurl- the URL the client will accessencoder- the encoder used to encode instances to stringsdecoder- the decoder used to decode strings to instancesretryer- the retryer used on failed requestsoptions- additional options for requestssslProperties- the SSL properties used to build an SSL context- Returns:
- a Feign-generated instance of the provided interface for accessing the given URL
- Throws:
SslContextFactory.SslException
-