Package feign

Class Target.EmptyTarget<T>

  • All Implemented Interfaces:
    Target<T>
    Enclosing interface:
    Target<T>

    public static final class Target.EmptyTarget<T>
    extends java.lang.Object
    implements Target<T>
    • Method Detail

      • create

        public static <T> Target.EmptyTarget<T> create​(java.lang.Class<T> type,
                                                       java.lang.String name)
      • type

        public java.lang.Class<T> type()
        Specified by:
        type in interface Target<T>
      • name

        public java.lang.String name()
        Specified by:
        name in interface Target<T>
      • url

        public java.lang.String url()
        Specified by:
        url in interface Target<T>
      • apply

        public Request apply​(RequestTemplate input)
        Description copied from interface: Target
        Targets a template to this target, adding the base url and any target-specific headers or query parameters.

        For example:
         public Request apply(RequestTemplate input) {
           input.insert(0, url());
           input.replaceHeader("X-Auth", currentToken);
           return input.asRequest();
         }
         



        relationship to JAXRS 2.0

        This call is similar to javax.ws.rs.client.WebTarget.request(), except that we expect transient, but necessary decoration to be applied on invocation.
        Specified by:
        apply in interface Target<T>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object