Class MetricsHttpAgent
- java.lang.Object
-
- com.alibaba.nacos.client.config.http.MetricsHttpAgent
-
-
Constructor Summary
Constructors Constructor Description MetricsHttpAgent(HttpAgent httpAgent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEncode()get encodeStringgetName()get nameStringgetNamespace()get namespaceStringgetTenant()get tenantHttpSimpleClient.HttpResulthttpDelete(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs)invoke http delete methodHttpSimpleClient.HttpResulthttpGet(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs)invoke http get methodHttpSimpleClient.HttpResulthttpPost(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs)invoke http post methodvoidstart()start to get nacos ip list
-
-
-
Constructor Detail
-
MetricsHttpAgent
public MetricsHttpAgent(HttpAgent httpAgent)
-
-
Method Detail
-
start
public void start() throws com.alibaba.nacos.api.exception.NacosExceptionDescription copied from interface:HttpAgentstart to get nacos ip list
-
httpGet
public HttpSimpleClient.HttpResult httpGet(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException
Description copied from interface:HttpAgentinvoke http get method- Specified by:
httpGetin interfaceHttpAgent- Parameters:
path- http pathheaders- http headersparamValues- http paramValues httpencoding- http encodereadTimeoutMs- 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:HttpAgentinvoke http post method- Specified by:
httpPostin interfaceHttpAgent- Parameters:
path- http pathheaders- http headersparamValues- http paramValues httpencoding- http encodereadTimeoutMs- http timeout- Returns:
- HttpResult http response
- Throws:
IOException- If an input or output exception occurred
-
httpDelete
public HttpSimpleClient.HttpResult httpDelete(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException
Description copied from interface:HttpAgentinvoke http delete method- Specified by:
httpDeletein interfaceHttpAgent- Parameters:
path- http pathheaders- http headersparamValues- http paramValues httpencoding- http encodereadTimeoutMs- http timeout- Returns:
- HttpResult http response
- Throws:
IOException- If an input or output exception occurred
-
getNamespace
public String getNamespace()
Description copied from interface:HttpAgentget namespace- Specified by:
getNamespacein interfaceHttpAgent- Returns:
- String
-
-