com.foxinmy.weixin4j.token
Class TokenManager

java.lang.Object
  extended by com.foxinmy.weixin4j.cache.CacheManager<Token>
      extended by com.foxinmy.weixin4j.token.TokenManager

public class TokenManager
extends CacheManager<Token>

对token的缓存获取

Since:
JDK 1.6
Author:
jinyu(foxinmy@gmail.com)
See Also:
TokenCreator, CacheStorager

Constructor Summary
TokenManager(TokenCreator tokenCreator, CacheStorager<Token> cacheStorager)
           
 
Method Summary
 String getAccessToken()
          获取token字符串
 String getWeixinId()
          返回唯一标识ID
 
Methods inherited from class com.foxinmy.weixin4j.cache.CacheManager
clearCache, evictCache, getCache, refreshCache
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenManager

public TokenManager(TokenCreator tokenCreator,
                    CacheStorager<Token> cacheStorager)
Parameters:
tokenCreator - 负责微信各种token的创建
cacheStorager - 负责token的存储
Method Detail

getAccessToken

public String getAccessToken()
                      throws WeixinException
获取token字符串

Returns:
token字符串
Throws:
WeixinException

getWeixinId

public String getWeixinId()
返回唯一标识ID

Returns:


Copyright © 2014–2017. All rights reserved.