Class FeignClientFactory

java.lang.Object
org.deltafi.common.http.client.feign.FeignClientFactory

public class FeignClientFactory extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> T
    build(Class<T> targetClass, String url)
    Builds a client for the provided Feign-annotated interface for the resources at the given URL.
    static <T> T
    build(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> 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FeignClientFactory

      public FeignClientFactory()
  • Method Details

    • build

      public static <T> T build(Class<T> targetClass, String url)
      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 class
      url - 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> targetClass, String url, SSLContext sslContext)
      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 class
      url - the URL the client will access
      sslContext - 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 class
      url - the URL the client will access
      sslContext - the SSLContext to use for creating an SSL connection to the given URL
      retryer - the retry settings for this Feign client
      Returns:
      a Feign-generated instance of the provided interface for accessing the given URL