Package com.bytedesk.wechat.pay.sdk
Class WXPayConfig
java.lang.Object
com.bytedesk.wechat.pay.sdk.WXPayConfig
- Direct Known Subclasses:
WeChatPayConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
getAppID()
获取 App IDprotected abstract InputStream
获取商户证书内容int
HTTP(S) 连接超时时间,单位毫秒int
HTTP(S) 读数据超时时间,单位毫秒protected abstract String
getKey()
获取 API 密钥protected abstract String
getMchID()
获取 Mch IDint
批量上报,一次最多上报多个数据int
健康上报缓存消息的最大数量。int
进行健康上报的线程的数量protected abstract IWXPayDomain
获取WXPayDomain, 用于多域名容灾自动切换boolean
是否自动上报。
-
Constructor Details
-
WXPayConfig
public WXPayConfig()
-
-
Method Details
-
getAppID
获取 App ID- Returns:
- App ID
-
getMchID
获取 Mch ID- Returns:
- Mch ID
-
getKey
获取 API 密钥- Returns:
- API密钥
-
getCertStream
获取商户证书内容- Returns:
- 商户证书内容
-
getHttpConnectTimeoutMs
public int getHttpConnectTimeoutMs()HTTP(S) 连接超时时间,单位毫秒- Returns:
-
getHttpReadTimeoutMs
public int getHttpReadTimeoutMs()HTTP(S) 读数据超时时间,单位毫秒- Returns:
-
getWXPayDomain
获取WXPayDomain, 用于多域名容灾自动切换- Returns:
-
shouldAutoReport
public boolean shouldAutoReport()是否自动上报。 若要关闭自动上报,子类中实现该函数返回 false 即可。- Returns:
-
getReportWorkerNum
public int getReportWorkerNum()进行健康上报的线程的数量- Returns:
-
getReportQueueMaxSize
public int getReportQueueMaxSize()健康上报缓存消息的最大数量。会有线程去独立上报 粗略计算:加入一条消息200B,10000消息占用空间 2000 KB,约为2MB,可以接受- Returns:
-
getReportBatchSize
public int getReportBatchSize()批量上报,一次最多上报多个数据- Returns:
-