| 构造器和说明 |
|---|
ServerHttpAgent(Properties properties) |
ServerHttpAgent(ServerListManager mgr) |
ServerHttpAgent(ServerListManager mgr,
Properties properties) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 |
shutdown() |
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
httpGet 在接口中 HttpAgentpath - 相对于web应用根,以/开头headers - headersparamValues - parametersencoding - encodingreadTimeoutMs - time out millisecondsIOException - io exceptionpublic HttpSimpleClient.HttpResult httpPost(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException
HttpAgenthttpPost 在接口中 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 在接口中 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 在接口中 HttpAgentNacosException - on get ip list error.public String getNamespace()
HttpAgentgetNamespace 在接口中 HttpAgentpublic void shutdown()
throws NacosException
shutdown 在接口中 CloseableNacosExceptionCopyright © 2018–2020 Alibaba Group. All rights reserved.