Class RestClient

  • All Implemented Interfaces:
    java.lang.reflect.InvocationHandler

    public final class RestClient
    extends java.lang.Object
    implements java.lang.reflect.InvocationHandler
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      dev.soffa.foundation.commons.http.HttpRequest createRequest​(java.lang.reflect.Method method, java.lang.Object... args)  
      java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object... args)  
      static <T> T newInstance​(java.lang.Class<T> clientInterface, java.lang.String baseUrl)  
      static <T> T newInstance​(java.lang.Class<T> clientInterface, java.lang.String baseUrl, dev.soffa.foundation.commons.http.HttpClient client)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • newInstance

        public static <T> T newInstance​(java.lang.Class<T> clientInterface,
                                        java.lang.String baseUrl)
      • newInstance

        public static <T> T newInstance​(java.lang.Class<T> clientInterface,
                                        java.lang.String baseUrl,
                                        dev.soffa.foundation.commons.http.HttpClient client)
      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       java.lang.Object... args)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable
      • createRequest

        public dev.soffa.foundation.commons.http.HttpRequest createRequest​(java.lang.reflect.Method method,
                                                                           java.lang.Object... args)