public class WxCpTpServiceApacheHttpClientImpl extends BaseWxCpTpServiceImpl<org.apache.http.impl.client.CloseableHttpClient,org.apache.http.HttpHost>
configStorage, globalSuiteAccessTokenRefreshLock, globalSuiteTicketRefreshLock
构造器和说明 |
---|
WxCpTpServiceApacheHttpClientImpl() |
限定符和类型 | 方法和说明 |
---|---|
org.apache.http.impl.client.CloseableHttpClient |
getRequestHttpClient() |
org.apache.http.HttpHost |
getRequestHttpProxy() |
HttpType |
getRequestType() |
String |
getSuiteAccessToken(boolean forceRefresh)
获取suite_access_token,本方法线程安全
且在多线程同时刷新时只刷新一次,避免超出2000次/日的调用次数上限
另:本service的所有方法都会在suite_access_token过期是调用此方法
程序员在非必要情况下尽量不要主动调用此方法
详情请见: https://work.weixin.qq.com/api/doc#90001/90143/90600
|
WxCpTpConfigStorage |
getWxCpTpConfigStorage()
获取WxMpConfigStorage 对象.
|
void |
initHttp()
初始化http请求对象
|
checkSignature, execute, executeInternal, get, getAuthInfo, getCorpToken, getPermanentCode, getPermanentCodeInfo, getPreAuthUrl, getRequestHttp, getSessionManager, getSuiteAccessToken, getSuiteTicket, getSuiteTicket, getTmpDirFile, jsCode2Session, post, setMaxRetryTimes, setRetrySleepMillis, setTmpDirFile, setWxCpTpConfigStorage
public org.apache.http.impl.client.CloseableHttpClient getRequestHttpClient()
public org.apache.http.HttpHost getRequestHttpProxy()
public HttpType getRequestType()
public String getSuiteAccessToken(boolean forceRefresh) throws WxErrorException
WxCpTpService
获取suite_access_token,本方法线程安全 且在多线程同时刷新时只刷新一次,避免超出2000次/日的调用次数上限 另:本service的所有方法都会在suite_access_token过期是调用此方法 程序员在非必要情况下尽量不要主动调用此方法 详情请见: https://work.weixin.qq.com/api/doc#90001/90143/90600
forceRefresh
- 强制刷新WxErrorException
- the wx error exceptionpublic void initHttp()
WxCpTpService
public WxCpTpConfigStorage getWxCpTpConfigStorage()
WxCpTpService
Copyright © 2020. All rights reserved.