public class Client extends Object
| Modifier and Type | Field and Description |
|---|---|
Integer |
_connectTimeout |
com.aliyun.credentials.Client |
_credential |
String |
_endpoint |
Map<String,String> |
_endpointMap |
String |
_endpointRule |
String |
_endpointType |
GlobalParameters |
_globalParameters |
Map<String,String> |
_headers |
String |
_httpProxy |
String |
_httpsProxy |
Integer |
_maxIdleConns |
String |
_method |
String |
_network |
String |
_noProxy |
String |
_openPlatformEndpoint |
String |
_productId |
String |
_protocol |
Integer |
_readTimeout |
String |
_regionId |
String |
_signatureAlgorithm |
String |
_signatureVersion |
String |
_socks5NetWork |
String |
_socks5Proxy |
com.aliyun.gateway.spi.Client |
_spi |
String |
_suffix |
String |
_userAgent |
| Constructor and Description |
|---|
Client(Config config)
Init client with Config
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRequestInterceptor(com.aliyun.tea.interceptor.RequestInterceptor interceptor) |
void |
addResponseInterceptor(com.aliyun.tea.interceptor.ResponseInterceptor interceptor) |
void |
addRuntimeOptionsInterceptor(com.aliyun.tea.interceptor.RuntimeOptionsInterceptor interceptor) |
Map<String,?> |
callApi(Params params,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime) |
void |
checkConfig(Config config)
If the endpointRule and config.endpoint are empty, throw error
|
static Object |
defaultAny(Object inputValue,
Object defaultValue)
If inputValue is not null, return it or return defaultValue
|
Map<String,?> |
doRequest(Params params,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime) |
Map<String,?> |
doROARequest(String action,
String version,
String protocol,
String method,
String authType,
String pathname,
String bodyType,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime) |
Map<String,?> |
doROARequestWithForm(String action,
String version,
String protocol,
String method,
String authType,
String pathname,
String bodyType,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime) |
Map<String,?> |
doRPCRequest(String action,
String version,
String protocol,
String method,
String authType,
String bodyType,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime) |
Map<String,?> |
execute(Params params,
OpenApiRequest request,
com.aliyun.teautil.models.RuntimeOptions runtime) |
String |
getAccessKeyId()
Get accesskey id by using credential
|
String |
getAccessKeySecret()
Get accesskey secret by using credential
|
String |
getBearerToken()
Get bearer token by credential
|
Map<String,String> |
getRpcHeaders()
get RPC header for debug
|
String |
getSecurityToken()
Get security token by using credential
|
String |
getType()
Get credential type by credential
|
String |
getUserAgent()
Get user agent
|
void |
setGatewayClient(com.aliyun.gateway.spi.Client spi)
set gateway client
|
void |
setRpcHeaders(Map<String,String> headers)
set RPC header for debug
|
public String _endpoint
public String _regionId
public String _protocol
public String _method
public String _userAgent
public String _endpointRule
public String _suffix
public Integer _readTimeout
public Integer _connectTimeout
public String _httpProxy
public String _httpsProxy
public String _socks5Proxy
public String _socks5NetWork
public String _noProxy
public String _network
public String _productId
public Integer _maxIdleConns
public String _endpointType
public String _openPlatformEndpoint
public com.aliyun.credentials.Client _credential
public String _signatureVersion
public String _signatureAlgorithm
public com.aliyun.gateway.spi.Client _spi
public GlobalParameters _globalParameters
public Map<String,?> doRPCRequest(String action, String version, String protocol, String method, String authType, String bodyType, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Exceptionpublic Map<String,?> doROARequest(String action, String version, String protocol, String method, String authType, String pathname, String bodyType, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Exceptionpublic Map<String,?> doROARequestWithForm(String action, String version, String protocol, String method, String authType, String pathname, String bodyType, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Exceptionpublic Map<String,?> doRequest(Params params, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Exceptionpublic Map<String,?> execute(Params params, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Exceptionpublic void addRuntimeOptionsInterceptor(com.aliyun.tea.interceptor.RuntimeOptionsInterceptor interceptor)
public void addRequestInterceptor(com.aliyun.tea.interceptor.RequestInterceptor interceptor)
public void addResponseInterceptor(com.aliyun.tea.interceptor.ResponseInterceptor interceptor)
public Map<String,?> callApi(Params params, OpenApiRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception
Exceptionpublic String getUserAgent() throws Exception
Exceptionpublic String getAccessKeyId() throws Exception
Exceptionpublic String getAccessKeySecret() throws Exception
Exceptionpublic String getSecurityToken() throws Exception
Exceptionpublic String getBearerToken() throws Exception
Exceptionpublic String getType() throws Exception
Exceptionpublic static Object defaultAny(Object inputValue, Object defaultValue) throws Exception
inputValue - users input valuedefaultValue - default valueExceptionpublic void checkConfig(Config config) throws Exception
config - config contains the necessary information to create a clientExceptionpublic void setGatewayClient(com.aliyun.gateway.spi.Client spi)
throws Exception
spi. - Exceptionpublic void setRpcHeaders(Map<String,String> headers) throws Exception
headers - headers for debug, this header can be used only once.ExceptionCopyright © 2022. All rights reserved.