All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.foxinmy.weixin4j.token.TokenManager Maven / Gradle / Ivy

There is a newer version: 1.10.2
Show newest version
package com.foxinmy.weixin4j.token;

import com.foxinmy.weixin4j.cache.CacheManager;
import com.foxinmy.weixin4j.cache.CacheStorager;
import com.foxinmy.weixin4j.exception.WeixinException;
import com.foxinmy.weixin4j.model.Token;

/**
 * 对token的缓存获取
 *
 * @className TokenManager
 * @author jinyu([email protected])
 * @date 2015年6月12日
 * @since JDK 1.6
 * @see TokenCreator
 * @see com.foxinmy.weixin4j.token.TokenCreator
 * @see com.foxinmy.weixin4j.cache.CacheStorager
 */
public class TokenManager extends CacheManager {
	/**
	 *
	 * @param tokenCreator
	 *            负责微信各种token的创建
	 * @param cacheStorager
	 *            负责token的存储
	 */
	public TokenManager(TokenCreator tokenCreator,
			CacheStorager cacheStorager) {
		super(tokenCreator, cacheStorager);
	}

	/**
	 * 获取token字符串
	 *
	 * @return token字符串
	 * @throws WeixinException
	 */
	public String getAccessToken() throws WeixinException {
		return super.getCache().getAccessToken();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy