public class ClientProfile extends Object
Modifier and Type | Field and Description |
---|---|
static String |
SIGN_SHA1
Constant for signature process using HmacSHA1 (version 1).
|
static String |
SIGN_SHA256
Constant for signature process using HmacSHA256 (version 1).
|
static String |
SIGN_TC3_256
Constant for signature process using TC3-HMAC-SHA256 (version 3).
|
Constructor and Description |
---|
ClientProfile()
Default constructor which initializes the ClientProfile with the default
signing method "TC3-HMAC-SHA256" and a default HTTP profile.
|
ClientProfile(String signMethod)
Constructor to initialize ClientProfile with a specific signing method.
|
ClientProfile(String signMethod,
HttpProfile httpProfile)
Constructor to initialize ClientProfile with a specific signing method and HTTP profile.
|
Modifier and Type | Method and Description |
---|---|
String |
getBackupEndpoint()
Getter for the backup endpoint, used when the primary endpoint is unavailable.
|
HttpProfile |
getHttpProfile()
Getter for the HTTP profile associated with the client.
|
Language |
getLanguage()
Getter for the language setting of the client.
|
String |
getSignMethod()
Getter for the signature method used in API requests.
|
boolean |
isDebug()
Getter for the debug flag, which indicates whether debugging is enabled.
|
boolean |
isUnsignedPayload()
Getter for the flag indicating whether the payload is ignored during signing.
|
void |
setBackupEndpoint(String backupEndpoint)
Setter for the backup endpoint.
|
void |
setDebug(boolean debug)
Setter for the debug flag, enabling or disabling debugging.
|
void |
setHttpProfile(HttpProfile httpProfile)
Setter for the HTTP profile associated with the client.
|
void |
setLanguage(Language lang)
Setter for the language setting of the client.
|
void |
setSignMethod(String signMethod)
Setter for the signature method used in API requests.
|
void |
setUnsignedPayload(boolean flag)
Setter for the flag indicating whether the payload should be ignored during signing.
|
public static final String SIGN_SHA1
public static final String SIGN_SHA256
public static final String SIGN_TC3_256
public ClientProfile(String signMethod, HttpProfile httpProfile)
signMethod
- The method used for signing the request (e.g., HmacSHA1, HmacSHA256, TC3-HMAC-SHA256).httpProfile
- The HTTP profile containing endpoint and connection settings.public ClientProfile(String signMethod)
signMethod
- The method used for signing the request (e.g., HmacSHA1, HmacSHA256, TC3-HMAC-SHA256).public ClientProfile()
public String getSignMethod()
public void setSignMethod(String signMethod)
signMethod
- The signature method (e.g., HmacSHA1, HmacSHA256, TC3-HMAC-SHA256).public HttpProfile getHttpProfile()
public void setHttpProfile(HttpProfile httpProfile)
httpProfile
- The new HTTP profile to be set.public boolean isUnsignedPayload()
public void setUnsignedPayload(boolean flag)
flag
- Set to true if the payload should be ignored, false otherwise.public Language getLanguage()
public void setLanguage(Language lang)
lang
- The language to set (e.g., zh-CN, en-US).public boolean isDebug()
public void setDebug(boolean debug)
debug
- Set to true to enable debugging, false to disable.public String getBackupEndpoint()
public void setBackupEndpoint(String backupEndpoint)
backupEndpoint
- The backup endpoint URL to be set.Copyright © 2025. All rights reserved.