Package feign

Class Feign

  • Direct Known Subclasses:
    ReflectiveFeign

    public abstract class Feign
    extends java.lang.Object
    Feign's purpose is to ease development against http apis that feign restfulness.
    In implementation, Feign is a factory for generating targeted http apis.
    • Constructor Detail

      • Feign

        public Feign()
    • Method Detail

      • configKey

        public static java.lang.String configKey​(java.lang.Class targetType,
                                                 java.lang.reflect.Method method)
        Configuration keys are formatted as unresolved see tags. This method exposes that format, in case you need to create the same value as MethodMetadata.configKey() for correlation purposes.

        Here are some sample encodings:

         
        • Route53: would match a class route53.Route53
        • Route53#list(): would match a method route53.Route53#list()
        • Route53#listAt(Marker): would match a method route53.Route53#listAt(Marker)
        • Route53#listByNameAndType(String, String): would match a method route53.Route53#listAt(String, String)
        Note that there is no whitespace expected in a key!
        Parameters:
        targetType - type of the Feign interface.
        method - invoked method, present on type or its super.
        See Also:
        MethodMetadata.configKey()
      • configKey

        @Deprecated
        public static java.lang.String configKey​(java.lang.reflect.Method method)
        Deprecated.
      • newInstance

        public abstract <T> T newInstance​(Target<T> target)
        Returns a new instance of an HTTP API, defined by annotations in the Contract, for the specified target. You should cache this result.