public abstract class AbstractClient extends Object
限定符和类型 | 字段和说明 |
---|---|
com.google.gson.Gson |
gson |
static int |
HTTP_RSP_OK |
static String |
SDK_VERSION |
构造器和说明 |
---|
AbstractClient(String endpoint,
String version,
Credential credential,
String region) |
AbstractClient(String endpoint,
String version,
Credential credential,
String region,
ClientProfile profile) |
限定符和类型 | 方法和说明 |
---|---|
String |
call(String action,
String jsonPayload)
Use post/json with tc3-hmac-sha256 signature to call any action.
|
String |
callOctetStream(String action,
HashMap<String,String> headers,
byte[] body)
Use post application/octet-stream with tc3-hmac-sha256 signature to call specific action.
|
ClientProfile |
getClientProfile() |
Credential |
getCredential() |
String |
getRegion() |
protected String |
internalRequest(AbstractModel request,
String actionName) |
Object |
retry(AbstractModel req,
int retryTimes)
请注意购买类接口谨慎调用,可能导致多次购买
仅幂等接口推荐使用
|
void |
setClientProfile(ClientProfile profile) |
void |
setCredential(Credential credential) |
void |
setRegion(String region) |
public static final int HTTP_RSP_OK
public com.google.gson.Gson gson
public AbstractClient(String endpoint, String version, Credential credential, String region)
public AbstractClient(String endpoint, String version, Credential credential, String region, ClientProfile profile)
public void setRegion(String region)
public String getRegion()
public void setClientProfile(ClientProfile profile)
public ClientProfile getClientProfile()
public void setCredential(Credential credential)
public Credential getCredential()
public String call(String action, String jsonPayload) throws TencentCloudSDKException
action
- Name of action to be called.jsonPayload
- Parameters of action serialized in json string format.TencentCloudSDKException
public String callOctetStream(String action, HashMap<String,String> headers, byte[] body) throws TencentCloudSDKException
action
- Name of action to be called.headers
- Parameters of the action, will be put in http header.body
- octet-stream binary body.TencentCloudSDKException
protected String internalRequest(AbstractModel request, String actionName) throws TencentCloudSDKException
public Object retry(AbstractModel req, int retryTimes) throws TencentCloudSDKException
req
- retryTimes
- TencentCloudSDKException
Copyright © 2022. All rights reserved.