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

me.chanjar.weixin.cp.config.WxCpTpConfigStorage Maven / Gradle / Ivy

There is a newer version: 4.6.7.B
Show newest version
package me.chanjar.weixin.cp.config;

import me.chanjar.weixin.common.bean.WxAccessToken;
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;

import java.io.File;

/**
 * 微信客户端(第三方应用)配置存储
 *
 * @author zhenjun cai
 */
public interface WxCpTpConfigStorage {

  /**
   * 设置企业微信服务器 baseUrl.
   * 默认值是 https://qyapi.weixin.qq.com , 如果使用默认值,则不需要调用 setBaseApiUrl
   *
   * @param baseUrl 企业微信服务器 Url
   */
  void setBaseApiUrl(String baseUrl);

  /**
   * 读取企业微信 API Url.
   * 支持私有化企业微信服务器.
   */
  String getApiUrl(String path);

  String getSuiteAccessToken();

  boolean isSuiteAccessTokenExpired();

  /**
   * 强制将suite access token过期掉.
   */
  void expireSuiteAccessToken();

  void updateSuiteAccessToken(WxAccessToken suiteAccessToken);

  void updateSuiteAccessToken(String suiteAccessToken, int expiresIn);

  String getSuiteTicket();

  boolean isSuiteTicketExpired();

  /**
   * 强制将suite ticket过期掉.
   */
  void expireSuiteTicket();

  /**
   * 应该是线程安全的.
   */
  void updateSuiteTicket(String suiteTicket, int expiresInSeconds);

  String getCorpId();

  String getCorpSecret();

  String getSuiteId();

  String getSuiteSecret();

  String getToken();

  String getAesKey();

  long getExpiresTime();

  String getHttpProxyHost();

  int getHttpProxyPort();

  String getHttpProxyUsername();

  String getHttpProxyPassword();

  File getTmpDirFile();

  /**
   * http client builder.
   *
   * @return ApacheHttpClientBuilder
   */
  ApacheHttpClientBuilder getApacheHttpClientBuilder();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy