| Constructor and Description |
|---|
ServerHttpAgent(Properties properties) |
ServerHttpAgent(ServerListManager mgr) |
ServerHttpAgent(ServerListManager mgr,
Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
static String |
getAppname() |
String |
getEncode()
get encode
|
String |
getName()
get name
|
String |
getNamespace()
get namespace
|
String |
getTenant()
get tenant
|
HttpSimpleClient.HttpResult |
httpDelete(String path,
List<String> headers,
List<String> paramValues,
String encoding,
long readTimeoutMs)
invoke http delete method
|
HttpSimpleClient.HttpResult |
httpGet(String path,
List<String> headers,
List<String> paramValues,
String encoding,
long readTimeoutMs)
invoke http get method
|
HttpSimpleClient.HttpResult |
httpPost(String path,
List<String> headers,
List<String> paramValues,
String encoding,
long readTimeoutMs)
invoke http post method
|
void |
start()
start to get nacos ip list
|
public ServerHttpAgent(ServerListManager mgr)
public ServerHttpAgent(ServerListManager mgr, Properties properties)
public ServerHttpAgent(Properties properties) throws NacosException
NacosExceptionpublic HttpSimpleClient.HttpResult httpGet(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException
HttpAgenthttpGet in interface HttpAgentpath - 相对于web应用根,以/开头headers - paramValues - encoding - readTimeoutMs - IOExceptionpublic HttpSimpleClient.HttpResult httpPost(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException
HttpAgenthttpPost in interface HttpAgentpath - http pathheaders - http headersparamValues - http paramValues httpencoding - http encodereadTimeoutMs - http timeoutIOException - If an input or output exception occurredpublic HttpSimpleClient.HttpResult httpDelete(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException
HttpAgenthttpDelete in interface HttpAgentpath - http pathheaders - http headersparamValues - http paramValues httpencoding - http encodereadTimeoutMs - http timeoutIOException - If an input or output exception occurredpublic static String getAppname()
public void start()
throws NacosException
HttpAgentstart in interface HttpAgentNacosException - on get ip list error.public String getNamespace()
HttpAgentgetNamespace in interface HttpAgentCopyright © 2018–2019 Alibaba Group. All rights reserved.