public interface WxChannelConfig
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
autoRefreshToken()
是否自动刷新token
|
void |
expireAccessToken()
强制将access token过期掉
|
String |
getAccessToken()
Gets access token.
|
Lock |
getAccessTokenLock()
Gets access token lock.
|
String |
getAccessTokenUrl()
获取自定义的获取accessToken地址,用于向自定义统一服务获取accessToken
|
String |
getAesKey()
Gets aes key.
|
ApacheHttpClientBuilder |
getApacheHttpClientBuilder()
http client builder
|
String |
getApiHostUrl()
获取自定义的apiHost地址,用于替换原请求中的https://api.weixin.qq.com
具体取值,可以参考https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Interface_field_description.html
|
String |
getAppid()
Gets appid.
|
long |
getExpiresTime()
Gets expires time.
|
String |
getHttpProxyHost()
Gets http proxy host.
|
String |
getHttpProxyPassword()
Gets http proxy password.
|
int |
getHttpProxyPort()
Gets http proxy port.
|
String |
getHttpProxyUsername()
Gets http proxy username.
|
int |
getMaxRetryTimes()
http 请求最大重试次数
BaseWxChannelService.setMaxRetryTimes(int)
|
String |
getMsgDataFormat()
Gets msg data format.
|
int |
getRetrySleepMillis()
http 请求重试间隔
BaseWxChannelService#setRetrySleepMillis(int)(int)
|
String |
getSecret()
Gets secret.
|
String |
getToken()
Gets token.
|
boolean |
isAccessTokenExpired()
Is access token expired boolean.
|
boolean |
isStableAccessToken()
Is use stable access token api
|
void |
setAccessTokenUrl(String accessTokenUrl)
设置自定义的获取accessToken地址 可用于设置获取accessToken的自定义服务
|
void |
setApiHostUrl(String apiHostUrl)
设置自定义的apiHost地址
具体取值,可以参考https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Interface_field_description.html
|
void |
updateAccessToken(String accessToken,
int expiresInSeconds)
应该是线程安全的
|
void |
updateAccessToken(WxAccessToken accessToken)
应该是线程安全的
|
String getAccessToken()
boolean isStableAccessToken()
Lock getAccessTokenLock()
boolean isAccessTokenExpired()
void expireAccessToken()
void updateAccessToken(WxAccessToken accessToken)
accessToken - 要更新的WxAccessToken对象void updateAccessToken(String accessToken, int expiresInSeconds)
accessToken - 新的accessToken值expiresInSeconds - 过期时间,以秒为单位String getAppid()
String getSecret()
String getToken()
String getAesKey()
String getMsgDataFormat()
long getExpiresTime()
String getHttpProxyHost()
int getHttpProxyPort()
String getHttpProxyUsername()
String getHttpProxyPassword()
int getRetrySleepMillis()
BaseWxChannelService#setRetrySleepMillis(int)(int)
int getMaxRetryTimes()
BaseWxChannelService.setMaxRetryTimes(int)
ApacheHttpClientBuilder getApacheHttpClientBuilder()
boolean autoRefreshToken()
void setApiHostUrl(String apiHostUrl)
apiHostUrl - api域名地址String getApiHostUrl()
String getAccessTokenUrl()
void setAccessTokenUrl(String accessTokenUrl)
accessTokenUrl - 自定义的获取accessToken地址Copyright © 2025. All rights reserved.