@Deprecated public class WxCpRedisConfigImpl extends Object implements WxCpConfigStorage
使用说明:本实现仅供参考,并不完整.
比如为减少项目依赖,未加入redis分布式锁的实现,如有需要请自行实现。
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
baseApiUrl
已过时。
The Base api url.
|
| 构造器和说明 |
|---|
WxCpRedisConfigImpl(redis.clients.jedis.JedisPool jedisPool)
已过时。
Instantiates a new Wx cp redis config.
|
WxCpRedisConfigImpl(redis.clients.jedis.JedisPoolConfig poolConfig,
String host,
int port)
已过时。
Instantiates a new Wx cp redis config.
|
WxCpRedisConfigImpl(redis.clients.jedis.JedisPoolConfig poolConfig,
String host,
int port,
int timeout,
String password)
已过时。
Instantiates a new Wx cp redis config.
|
WxCpRedisConfigImpl(redis.clients.jedis.JedisPoolConfig poolConfig,
String host,
int port,
int timeout,
String password,
int database)
已过时。
Instantiates a new Wx cp redis config.
|
WxCpRedisConfigImpl(String host,
int port)
已过时。
Instantiates a new Wx cp redis config.
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
acquireMsgAuditSdk()
已过时。
获取当前SDK并增加引用计数(原子操作)
如果SDK未初始化或已过期,返回0而不增加引用计数
此方法用于在获取SDK后立即增加引用计数,避免并发问题
|
boolean |
autoRefreshToken()
已过时。
是否自动刷新token
|
int |
decrementMsgAuditSdkRefCount(long sdk)
已过时。
减少会话存档SDK的引用计数
当引用计数降为0时,自动销毁SDK以释放资源
|
void |
destroy()
已过时。
This method will be destroy jedis pool
|
void |
expireAccessToken()
已过时。
强制将access token过期掉.
|
void |
expireAgentJsapiTicket()
已过时。
强制将jsapi ticket过期掉.
|
void |
expireJsapiTicket()
已过时。
强制将jsapi ticket过期掉.
|
void |
expireMsgAuditAccessToken()
已过时。
强制将会话存档access token过期掉
|
void |
expireMsgAuditSdk()
已过时。
使会话存档SDK过期
|
String |
getAccessToken()
已过时。
Gets access token.
|
Lock |
getAccessTokenLock()
已过时。
Gets access token lock.
|
String |
getAesKey()
已过时。
Gets aes key.
|
Integer |
getAgentId()
已过时。
Gets agent id.
|
String |
getAgentJsapiTicket()
已过时。
Gets agent jsapi ticket.
|
Lock |
getAgentJsapiTicketLock()
已过时。
Gets agent jsapi ticket lock.
|
ApacheHttpClientBuilder |
getApacheHttpClientBuilder()
已过时。
http client builder.
|
String |
getApiUrl(String path)
已过时。
读取企业微信 API Url.
|
String |
getCorpId()
已过时。
Gets corp id.
|
String |
getCorpSecret()
已过时。
Gets corp secret.
|
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.
|
String |
getJsapiTicket()
已过时。
Gets jsapi ticket.
|
Lock |
getJsapiTicketLock()
已过时。
Gets jsapi ticket lock.
|
String |
getMsgAuditAccessToken()
已过时。
获取会话存档的access token
|
Lock |
getMsgAuditAccessTokenLock()
已过时。
获取会话存档access token的锁
|
String |
getMsgAuditLibPath()
已过时。
获取企微会话存档系统库 绝对路径
|
String |
getMsgAuditPriKey()
已过时。
企微会话存档私钥
|
long |
getMsgAuditSdk()
已过时。
获取会话存档SDK(历史接口)。
|
int |
getMsgAuditSdkRefCount(long sdk)
已过时。
获取会话存档SDK的引用计数
|
String |
getMsgAuditSecret()
已过时。
获取会话存档的secret
|
String |
getOauth2redirectUri()
已过时。
Gets oauth 2 redirect uri.
|
File |
getTmpDirFile()
已过时。
Gets tmp dir file.
|
String |
getToken()
已过时。
Gets token.
|
String |
getWebhookKey()
已过时。
获取群机器人webhook的key
|
int |
incrementMsgAuditSdkRefCount(long sdk)
已过时。
增加会话存档SDK的引用计数
用于支持多线程安全的SDK生命周期管理
|
boolean |
isAccessTokenExpired()
已过时。
Is access token expired boolean.
|
boolean |
isAgentJsapiTicketExpired()
已过时。
Is agent jsapi ticket expired boolean.
|
boolean |
isJsapiTicketExpired()
已过时。
Is jsapi ticket expired boolean.
|
boolean |
isMsgAuditAccessTokenExpired()
已过时。
检查会话存档access token是否已过期
|
boolean |
isMsgAuditSdkExpired()
已过时。
检查会话存档SDK是否已过期
|
void |
releaseMsgAuditSdk(long sdk)
已过时。
减少SDK引用计数并在必要时释放(原子操作)
此方法确保引用计数递减和SDK检查在同一个同步块内完成
|
void |
setAesKey(String aesKey)
已过时。
Sets aes key.
|
void |
setAgentId(Integer agentId)
已过时。
Sets agent id.
|
void |
setApacheHttpClientBuilder(ApacheHttpClientBuilder apacheHttpClientBuilder)
已过时。
Sets apache http client builder.
|
void |
setBaseApiUrl(String baseUrl)
已过时。
设置企业微信服务器 baseUrl.
|
void |
setCorpId(String corpId)
已过时。
Sets corp id.
|
void |
setCorpSecret(String corpSecret)
已过时。
Sets corp secret.
|
void |
setHttpProxyHost(String httpProxyHost)
已过时。
Sets http proxy host.
|
void |
setHttpProxyPassword(String httpProxyPassword)
已过时。
Sets http proxy password.
|
void |
setHttpProxyPort(int httpProxyPort)
已过时。
Sets http proxy port.
|
void |
setHttpProxyUsername(String httpProxyUsername)
已过时。
Sets http proxy username.
|
void |
setOauth2redirectUri(String oauth2redirectUri)
已过时。
Sets oauth 2 redirect uri.
|
void |
setTmpDirFile(File tmpDirFile)
已过时。
Sets tmp dir file.
|
void |
setToken(String token)
已过时。
Sets token.
|
void |
updateAccessToken(String accessToken,
int expiresInSeconds)
已过时。
Update access token.
|
void |
updateAccessToken(WxAccessToken accessToken)
已过时。
Update access token.
|
void |
updateAgentJsapiTicket(String jsapiTicket,
int expiresInSeconds)
已过时。
应该是线程安全的.
|
void |
updateJsapiTicket(String jsapiTicket,
int expiresInSeconds)
已过时。
应该是线程安全的.
|
void |
updateMsgAuditAccessToken(String accessToken,
int expiresInSeconds)
已过时。
更新会话存档access token
|
void |
updateMsgAuditSdk(long sdk,
int expiresInSeconds)
已过时。
更新会话存档SDK
|
protected volatile String baseApiUrl
public WxCpRedisConfigImpl(redis.clients.jedis.JedisPool jedisPool)
jedisPool - the jedis poolpublic WxCpRedisConfigImpl(String host, int port)
host - the hostport - the portpublic WxCpRedisConfigImpl(redis.clients.jedis.JedisPoolConfig poolConfig,
String host,
int port)
poolConfig - the pool confighost - the hostport - the portpublic WxCpRedisConfigImpl(redis.clients.jedis.JedisPoolConfig poolConfig,
String host,
int port,
int timeout,
String password)
poolConfig - the pool confighost - the hostport - the porttimeout - the timeoutpassword - the passwordpublic WxCpRedisConfigImpl(redis.clients.jedis.JedisPoolConfig poolConfig,
String host,
int port,
int timeout,
String password,
int database)
poolConfig - the pool confighost - the hostport - the porttimeout - the timeoutpassword - the passworddatabase - the databasepublic void setBaseApiUrl(String baseUrl)
WxCpConfigStoragesetBaseApiUrl 在接口中 WxCpConfigStoragebaseUrl - 企业微信服务器 Urlpublic String getApiUrl(String path)
WxCpConfigStoragegetApiUrl 在接口中 WxCpConfigStoragepath - the pathpublic void destroy()
public String getAccessToken()
WxCpConfigStoragegetAccessToken 在接口中 WxCpConfigStoragepublic Lock getAccessTokenLock()
WxCpConfigStoragegetAccessTokenLock 在接口中 WxCpConfigStoragepublic boolean isAccessTokenExpired()
WxCpConfigStorageisAccessTokenExpired 在接口中 WxCpConfigStoragepublic void expireAccessToken()
WxCpConfigStorageexpireAccessToken 在接口中 WxCpConfigStoragepublic void updateAccessToken(WxAccessToken accessToken)
WxCpConfigStorageupdateAccessToken 在接口中 WxCpConfigStorageaccessToken - the access tokenpublic void updateAccessToken(String accessToken, int expiresInSeconds)
WxCpConfigStorageupdateAccessToken 在接口中 WxCpConfigStorageaccessToken - the access tokenexpiresInSeconds - the expires inpublic String getJsapiTicket()
WxCpConfigStoragegetJsapiTicket 在接口中 WxCpConfigStoragepublic Lock getJsapiTicketLock()
WxCpConfigStoragegetJsapiTicketLock 在接口中 WxCpConfigStoragepublic boolean isJsapiTicketExpired()
WxCpConfigStorageisJsapiTicketExpired 在接口中 WxCpConfigStoragepublic void expireJsapiTicket()
WxCpConfigStorageexpireJsapiTicket 在接口中 WxCpConfigStoragepublic void updateJsapiTicket(String jsapiTicket, int expiresInSeconds)
WxCpConfigStorageupdateJsapiTicket 在接口中 WxCpConfigStoragejsapiTicket - the jsapi ticketexpiresInSeconds - the expires in secondspublic String getAgentJsapiTicket()
WxCpConfigStoragegetAgentJsapiTicket 在接口中 WxCpConfigStoragepublic Lock getAgentJsapiTicketLock()
WxCpConfigStoragegetAgentJsapiTicketLock 在接口中 WxCpConfigStoragepublic boolean isAgentJsapiTicketExpired()
WxCpConfigStorageisAgentJsapiTicketExpired 在接口中 WxCpConfigStoragepublic void expireAgentJsapiTicket()
WxCpConfigStorageexpireAgentJsapiTicket 在接口中 WxCpConfigStoragepublic void updateAgentJsapiTicket(String jsapiTicket, int expiresInSeconds)
WxCpConfigStorageupdateAgentJsapiTicket 在接口中 WxCpConfigStoragejsapiTicket - the jsapi ticketexpiresInSeconds - the expires in secondspublic String getCorpId()
WxCpConfigStoragegetCorpId 在接口中 WxCpConfigStoragepublic void setCorpId(String corpId)
corpId - the corp idpublic String getCorpSecret()
WxCpConfigStoragegetCorpSecret 在接口中 WxCpConfigStoragepublic void setCorpSecret(String corpSecret)
corpSecret - the corp secretpublic Integer getAgentId()
WxCpConfigStoragegetAgentId 在接口中 WxCpConfigStoragepublic void setAgentId(Integer agentId)
agentId - the agent idpublic String getToken()
WxCpConfigStoragegetToken 在接口中 WxCpConfigStoragepublic void setToken(String token)
token - the tokenpublic String getAesKey()
WxCpConfigStoragegetAesKey 在接口中 WxCpConfigStoragepublic String getMsgAuditPriKey()
WxCpConfigStoragegetMsgAuditPriKey 在接口中 WxCpConfigStoragepublic String getMsgAuditLibPath()
WxCpConfigStoragegetMsgAuditLibPath 在接口中 WxCpConfigStoragepublic void setAesKey(String aesKey)
aesKey - the aes keypublic long getExpiresTime()
WxCpConfigStoragegetExpiresTime 在接口中 WxCpConfigStoragepublic String getOauth2redirectUri()
WxCpConfigStoragegetOauth2redirectUri 在接口中 WxCpConfigStoragepublic void setOauth2redirectUri(String oauth2redirectUri)
oauth2redirectUri - the oauth 2 redirect uripublic String getHttpProxyHost()
WxCpConfigStoragegetHttpProxyHost 在接口中 WxCpConfigStoragepublic void setHttpProxyHost(String httpProxyHost)
httpProxyHost - the http proxy hostpublic int getHttpProxyPort()
WxCpConfigStoragegetHttpProxyPort 在接口中 WxCpConfigStoragepublic void setHttpProxyPort(int httpProxyPort)
httpProxyPort - the http proxy portpublic String getHttpProxyUsername()
WxCpConfigStoragegetHttpProxyUsername 在接口中 WxCpConfigStoragepublic void setHttpProxyUsername(String httpProxyUsername)
httpProxyUsername - the http proxy usernamepublic String getHttpProxyPassword()
WxCpConfigStoragegetHttpProxyPassword 在接口中 WxCpConfigStoragepublic void setHttpProxyPassword(String httpProxyPassword)
httpProxyPassword - the http proxy passwordpublic File getTmpDirFile()
WxCpConfigStoragegetTmpDirFile 在接口中 WxCpConfigStoragepublic void setTmpDirFile(File tmpDirFile)
tmpDirFile - the tmp dir filepublic ApacheHttpClientBuilder getApacheHttpClientBuilder()
WxCpConfigStoragegetApacheHttpClientBuilder 在接口中 WxCpConfigStoragepublic void setApacheHttpClientBuilder(ApacheHttpClientBuilder apacheHttpClientBuilder)
apacheHttpClientBuilder - the apache http client builderpublic boolean autoRefreshToken()
WxCpConfigStorageautoRefreshToken 在接口中 WxCpConfigStoragepublic String getWebhookKey()
WxCpConfigStoragegetWebhookKey 在接口中 WxCpConfigStoragepublic String getMsgAuditSecret()
WxCpConfigStoragegetMsgAuditSecret 在接口中 WxCpConfigStoragepublic String getMsgAuditAccessToken()
WxCpConfigStoragegetMsgAuditAccessToken 在接口中 WxCpConfigStoragepublic Lock getMsgAuditAccessTokenLock()
WxCpConfigStoragegetMsgAuditAccessTokenLock 在接口中 WxCpConfigStoragepublic boolean isMsgAuditAccessTokenExpired()
WxCpConfigStorageisMsgAuditAccessTokenExpired 在接口中 WxCpConfigStoragepublic void expireMsgAuditAccessToken()
WxCpConfigStorageexpireMsgAuditAccessToken 在接口中 WxCpConfigStoragepublic void updateMsgAuditAccessToken(String accessToken, int expiresInSeconds)
WxCpConfigStorageupdateMsgAuditAccessToken 在接口中 WxCpConfigStorageaccessToken - 会话存档access tokenexpiresInSeconds - 过期时间(秒)public long getMsgAuditSdk()
WxCpConfigStorage历史实现中,会话存档 SDK 初始化后有效期为 7200 秒,由 ConfigStorage 负责维护; 该语义现已废弃,不再保证。
getMsgAuditSdk 在接口中 WxCpConfigStoragepublic boolean isMsgAuditSdkExpired()
WxCpConfigStorageisMsgAuditSdkExpired 在接口中 WxCpConfigStoragepublic void updateMsgAuditSdk(long sdk,
int expiresInSeconds)
WxCpConfigStorageupdateMsgAuditSdk 在接口中 WxCpConfigStoragesdk - sdk idexpiresInSeconds - 过期时间(秒)public void expireMsgAuditSdk()
WxCpConfigStorageexpireMsgAuditSdk 在接口中 WxCpConfigStoragepublic int incrementMsgAuditSdkRefCount(long sdk)
WxCpConfigStorageincrementMsgAuditSdkRefCount 在接口中 WxCpConfigStoragesdk - sdk idpublic int decrementMsgAuditSdkRefCount(long sdk)
WxCpConfigStoragedecrementMsgAuditSdkRefCount 在接口中 WxCpConfigStoragesdk - sdk idpublic int getMsgAuditSdkRefCount(long sdk)
WxCpConfigStoragegetMsgAuditSdkRefCount 在接口中 WxCpConfigStoragesdk - sdk idpublic long acquireMsgAuditSdk()
WxCpConfigStorageacquireMsgAuditSdk 在接口中 WxCpConfigStoragepublic void releaseMsgAuditSdk(long sdk)
WxCpConfigStoragereleaseMsgAuditSdk 在接口中 WxCpConfigStoragesdk - sdk idCopyright © 2026. All rights reserved.