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> clientClass)
    Builds a client for the provided Feign-annotated interface.
    static <T> T
    build(Class<T> clientClass, String url)
    Builds a client for the provided Feign-annotated interface for the resources at the given URL.
    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.
    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.
    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)
    Builds an SSL-enabled client for the provided Feign-annotated interface for the resources at the given URL.
    static <T> T
    build(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> T
    build(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> T
    build(Class<T> clientClass, SslProperties sslProperties)
    Builds an SSL-enabled client for the provided Feign-annotated interface.

    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> clientClass)
      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

      public static <T> T build(Class<T> clientClass, 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:
      clientClass - 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> 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 class
      url - the URL the client will access
      encoder - the encoder used to encode instances to strings
      decoder - the decoder used to decode strings to instances
      retryer - 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 class
      url - the URL the client will access
      encoder - the encoder used to encode instances to strings
      decoder - the decoder used to decode strings to instances
      retryer - the retryer used on failed requests
      options - 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 class
      sslProperties - 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 class
      url - the URL the client will access
      sslProperties - 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 class
      url - the URL the client will access
      encoder - the encoder used to encode instances to strings
      decoder - the decoder used to decode strings to instances
      retryer - the retryer used on failed requests
      sslProperties - 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 class
      url - the URL the client will access
      encoder - the encoder used to encode instances to strings
      decoder - the decoder used to decode strings to instances
      retryer - the retryer used on failed requests
      options - additional options for requests
      sslProperties - 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