Class RESTClient

  • All Implemented Interfaces:
    IRESTClient

    public class RESTClient
    extends java.lang.Object
    implements IRESTClient
    Used internally to implement an object capable to perform REST requests.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.util.List<java.lang.String> metrics
      Safeguarded against multiple writers and on copy-and-clean when writing the headers.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void get​(java.lang.String endpoint, IRESTResponseListener callback)  
      void get​(java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.String> params, IRESTResponseListener callback)  
      void post​(java.lang.String endpoint, java.lang.String encodedBody, IRESTResponseListener callback)  
      void post​(java.lang.String endpoint, java.lang.String encodedBody, IRESTResponseListener callback, java.lang.String contentType)  
      • Methods inherited from class java.lang.Object

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

      • metrics

        protected static java.util.List<java.lang.String> metrics
        Safeguarded against multiple writers and on copy-and-clean when writing the headers.
    • Constructor Detail

      • RESTClient

        public RESTClient​(int httpTimeout)
    • Method Detail

      • get

        public void get​(java.lang.String endpoint,
                        java.util.Map<java.lang.String,​java.lang.String> params,
                        IRESTResponseListener callback)
                 throws java.io.UnsupportedEncodingException
        Specified by:
        get in interface IRESTClient
        Throws:
        java.io.UnsupportedEncodingException
      • post

        public void post​(java.lang.String endpoint,
                         java.lang.String encodedBody,
                         IRESTResponseListener callback,
                         java.lang.String contentType)
        Specified by:
        post in interface IRESTClient