Class FeignClientFactory


  • public class FeignClientFactory
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T build​(java.lang.Class<T> targetClass, java.lang.String url)
      Builds a client for the provided Feign-annotated interface for the resources at the given URL.
      static <T> T build​(java.lang.Class<T> targetClass, java.lang.String url, javax.net.ssl.SSLContext sslContext)
      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 Detail

      • FeignClientFactory

        public FeignClientFactory()
    • Method Detail

      • build

        public static <T> T build​(java.lang.Class<T> targetClass,
                                  java.lang.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​(java.lang.Class<T> targetClass,
                                  java.lang.String url,
                                  javax.net.ssl.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