Update TokenHolder.java

增加手动移除token 的方法。
This commit is contained in:
fengyapeng 2016-03-07 13:13:18 +08:00
parent 92a847ecac
commit 8d4e0cfec5

View File

@ -75,6 +75,16 @@ public class TokenHolder {
return token;
}
/**
* 手动移除token
* @return 被移除的token
* @throws WeixinException
*/
public Token evictToken() throws WeixinException {
String cacheKey = tokenCreator.getCacheKey();
return tokenStorager.evict(cacheKey);
}
public TokenStorager getTokenStorager() {
return tokenStorager;
}