Class MetricsHttpAgent

  • All Implemented Interfaces:
    HttpAgent

    public class MetricsHttpAgent
    extends Object
    implements HttpAgent
    MetricsHttpAgent
    Author:
    Nacos
    • Constructor Detail

      • MetricsHttpAgent

        public MetricsHttpAgent​(HttpAgent httpAgent)
    • Method Detail

      • start

        public void start()
                   throws com.alibaba.nacos.api.exception.NacosException
        Description copied from interface: HttpAgent
        start to get nacos ip list
        Specified by:
        start in interface HttpAgent
        Throws:
        com.alibaba.nacos.api.exception.NacosException - on get ip list error.
      • httpGet

        public HttpSimpleClient.HttpResult httpGet​(String path,
                                                   List<String> headers,
                                                   List<String> paramValues,
                                                   String encoding,
                                                   long readTimeoutMs)
                                            throws IOException
        Description copied from interface: HttpAgent
        invoke http get method
        Specified by:
        httpGet in interface HttpAgent
        Parameters:
        path - http path
        headers - http headers
        paramValues - http paramValues http
        encoding - http encode
        readTimeoutMs - http timeout
        Returns:
        HttpResult http response
        Throws:
        IOException - If an input or output exception occurred
      • httpPost

        public HttpSimpleClient.HttpResult httpPost​(String path,
                                                    List<String> headers,
                                                    List<String> paramValues,
                                                    String encoding,
                                                    long readTimeoutMs)
                                             throws IOException
        Description copied from interface: HttpAgent
        invoke http post method
        Specified by:
        httpPost in interface HttpAgent
        Parameters:
        path - http path
        headers - http headers
        paramValues - http paramValues http
        encoding - http encode
        readTimeoutMs - http timeout
        Returns:
        HttpResult http response
        Throws:
        IOException - If an input or output exception occurred