public class WxCpRedissonConfigImpl extends WxCpDefaultConfigImpl
限定符和类型 | 字段和说明 |
---|---|
protected java.lang.String |
accessTokenKey
The Access token key.
|
protected java.lang.String |
agentJsapiTicketKey
The Agent jsapi ticket key.
|
protected static java.lang.String |
CP_ACCESS_TOKEN_KEY
The constant CP_ACCESS_TOKEN_KEY.
|
protected static java.lang.String |
CP_AGENT_JSAPI_TICKET_KEY
The constant CP_AGENT_JSAPI_TICKET_KEY.
|
protected static java.lang.String |
CP_JSAPI_TICKET_KEY
The constant CP_JSAPI_TICKET_KEY.
|
protected java.lang.String |
jsapiTicketKey
The Jsapi ticket key.
|
protected java.lang.String |
keyPrefix
redis 存储的 key 的前缀,可为空
|
protected static java.lang.String |
LOCK_KEY
The constant LOCK_KEY.
|
protected java.lang.String |
lockKey
The Lock key.
|
accessToken, accessTokenLock, agentId, agentJsapiTicketLock, jsapiTicketLock
构造器和说明 |
---|
WxCpRedissonConfigImpl(@NonNull org.redisson.api.RedissonClient redissonClient)
Instantiates a new Wx cp redisson config.
|
WxCpRedissonConfigImpl(@NonNull org.redisson.api.RedissonClient redissonClient,
java.lang.String keyPrefix)
Instantiates a new Wx cp redisson config.
|
WxCpRedissonConfigImpl(@NonNull me.chanjar.weixin.common.redis.WxRedisOps redisOps,
java.lang.String keyPrefix)
Instantiates a new Wx cp redisson config.
|
限定符和类型 | 方法和说明 |
---|---|
void |
expireAccessToken()
强制将access token过期掉.
|
void |
expireAgentJsapiTicket()
强制将jsapi ticket过期掉.
|
void |
expireJsapiTicket()
强制将jsapi ticket过期掉.
|
java.lang.String |
getAccessToken()
Gets access token.
|
java.util.concurrent.locks.Lock |
getAccessTokenLock()
Gets access token lock.
|
java.lang.String |
getAgentJsapiTicket()
Gets agent jsapi ticket.
|
java.util.concurrent.locks.Lock |
getAgentJsapiTicketLock()
Gets agent jsapi ticket lock.
|
java.lang.String |
getJsapiTicket()
Gets jsapi ticket.
|
java.util.concurrent.locks.Lock |
getJsapiTicketLock()
Gets jsapi ticket lock.
|
protected java.util.concurrent.locks.Lock |
getLockByKey(java.lang.String key)
Gets lock by key.
|
boolean |
isAccessTokenExpired()
Is access token expired boolean.
|
boolean |
isAgentJsapiTicketExpired()
Is agent jsapi ticket expired boolean.
|
boolean |
isJsapiTicketExpired()
Is jsapi ticket expired boolean.
|
void |
setAgentId(java.lang.Integer agentId)
设置企业微信自研应用ID(整数),同时初始化相关的redis key,注意要先调用setCorpId,再调用setAgentId
|
void |
updateAccessToken(java.lang.String accessToken,
int expiresInSeconds)
Update access token.
|
void |
updateAccessToken(me.chanjar.weixin.common.bean.WxAccessToken accessToken)
Update access token.
|
void |
updateAgentJsapiTicket(java.lang.String agentJsapiTicket,
int expiresInSeconds)
应该是线程安全的.
|
void |
updateJsapiTicket(java.lang.String jsapiTicket,
int expiresInSeconds)
应该是线程安全的.
|
autoRefreshToken, getAesKey, getAgentId, getApacheHttpClientBuilder, getApiUrl, getCorpId, getCorpSecret, getExpiresTime, getHttpProxyHost, getHttpProxyPassword, getHttpProxyPort, getHttpProxyUsername, getJsapiTicketExpiresTime, getMsgAuditLibPath, getOauth2redirectUri, getTmpDirFile, getToken, getWebhookKey, setAccessToken, setAesKey, setApacheHttpClientBuilder, setBaseApiUrl, setCorpId, setCorpSecret, setExpiresTime, setHttpProxyHost, setHttpProxyPassword, setHttpProxyPort, setHttpProxyUsername, setJsapiTicket, setJsapiTicketExpiresTime, setMsgAuditLibPath, setOauth2redirectUri, setTmpDirFile, setToken, setWebhookKey, toString
protected static final java.lang.String LOCK_KEY
protected static final java.lang.String CP_ACCESS_TOKEN_KEY
protected static final java.lang.String CP_JSAPI_TICKET_KEY
protected static final java.lang.String CP_AGENT_JSAPI_TICKET_KEY
protected java.lang.String keyPrefix
protected java.lang.String accessTokenKey
protected java.lang.String jsapiTicketKey
protected java.lang.String agentJsapiTicketKey
protected java.lang.String lockKey
public WxCpRedissonConfigImpl(@NonNull @NonNull org.redisson.api.RedissonClient redissonClient, java.lang.String keyPrefix)
redissonClient
- the redisson clientkeyPrefix
- the key prefixpublic WxCpRedissonConfigImpl(@NonNull @NonNull org.redisson.api.RedissonClient redissonClient)
redissonClient
- the redisson clientpublic WxCpRedissonConfigImpl(@NonNull @NonNull me.chanjar.weixin.common.redis.WxRedisOps redisOps, java.lang.String keyPrefix)
redisOps
- the redis opskeyPrefix
- the key prefixpublic void setAgentId(java.lang.Integer agentId)
setAgentId
在类中 WxCpDefaultConfigImpl
agentId
- agentIdprotected java.util.concurrent.locks.Lock getLockByKey(java.lang.String key)
key
- the keypublic java.util.concurrent.locks.Lock getAccessTokenLock()
WxCpConfigStorage
getAccessTokenLock
在接口中 WxCpConfigStorage
getAccessTokenLock
在类中 WxCpDefaultConfigImpl
public java.util.concurrent.locks.Lock getAgentJsapiTicketLock()
WxCpConfigStorage
getAgentJsapiTicketLock
在接口中 WxCpConfigStorage
getAgentJsapiTicketLock
在类中 WxCpDefaultConfigImpl
public java.util.concurrent.locks.Lock getJsapiTicketLock()
WxCpConfigStorage
getJsapiTicketLock
在接口中 WxCpConfigStorage
getJsapiTicketLock
在类中 WxCpDefaultConfigImpl
public java.lang.String getAccessToken()
WxCpConfigStorage
getAccessToken
在接口中 WxCpConfigStorage
getAccessToken
在类中 WxCpDefaultConfigImpl
public boolean isAccessTokenExpired()
WxCpConfigStorage
isAccessTokenExpired
在接口中 WxCpConfigStorage
isAccessTokenExpired
在类中 WxCpDefaultConfigImpl
public void updateAccessToken(me.chanjar.weixin.common.bean.WxAccessToken accessToken)
WxCpConfigStorage
updateAccessToken
在接口中 WxCpConfigStorage
updateAccessToken
在类中 WxCpDefaultConfigImpl
accessToken
- the access tokenpublic void updateAccessToken(java.lang.String accessToken, int expiresInSeconds)
WxCpConfigStorage
updateAccessToken
在接口中 WxCpConfigStorage
updateAccessToken
在类中 WxCpDefaultConfigImpl
accessToken
- the access tokenexpiresInSeconds
- the expires inpublic void expireAccessToken()
WxCpConfigStorage
expireAccessToken
在接口中 WxCpConfigStorage
expireAccessToken
在类中 WxCpDefaultConfigImpl
public java.lang.String getJsapiTicket()
WxCpConfigStorage
getJsapiTicket
在接口中 WxCpConfigStorage
getJsapiTicket
在类中 WxCpDefaultConfigImpl
public boolean isJsapiTicketExpired()
WxCpConfigStorage
isJsapiTicketExpired
在接口中 WxCpConfigStorage
isJsapiTicketExpired
在类中 WxCpDefaultConfigImpl
public void expireJsapiTicket()
WxCpConfigStorage
expireJsapiTicket
在接口中 WxCpConfigStorage
expireJsapiTicket
在类中 WxCpDefaultConfigImpl
public void updateJsapiTicket(java.lang.String jsapiTicket, int expiresInSeconds)
WxCpConfigStorage
updateJsapiTicket
在接口中 WxCpConfigStorage
updateJsapiTicket
在类中 WxCpDefaultConfigImpl
jsapiTicket
- the jsapi ticketexpiresInSeconds
- the expires in secondspublic void expireAgentJsapiTicket()
WxCpConfigStorage
expireAgentJsapiTicket
在接口中 WxCpConfigStorage
expireAgentJsapiTicket
在类中 WxCpDefaultConfigImpl
public void updateAgentJsapiTicket(java.lang.String agentJsapiTicket, int expiresInSeconds)
WxCpConfigStorage
updateAgentJsapiTicket
在接口中 WxCpConfigStorage
updateAgentJsapiTicket
在类中 WxCpDefaultConfigImpl
agentJsapiTicket
- the jsapi ticketexpiresInSeconds
- the expires in secondspublic java.lang.String getAgentJsapiTicket()
WxCpConfigStorage
getAgentJsapiTicket
在接口中 WxCpConfigStorage
getAgentJsapiTicket
在类中 WxCpDefaultConfigImpl
public boolean isAgentJsapiTicketExpired()
WxCpConfigStorage
isAgentJsapiTicketExpired
在接口中 WxCpConfigStorage
isAgentJsapiTicketExpired
在类中 WxCpDefaultConfigImpl