public class WxMaServiceImpl extends Object implements WxMaService, RequestHttp<org.apache.http.impl.client.CloseableHttpClient,org.apache.http.HttpHost>
GET_ACCESS_TOKEN_URL| 构造器和说明 | 
|---|
| WxMaServiceImpl() | 
| 限定符和类型 | 方法和说明 | 
|---|---|
| boolean | checkSignature(String timestamp,
              String nonce,
              String signature)
 验证消息的确来自微信服务器
 详情请见: http://mp.weixin.qq.com/wiki? | 
| <T,E> T | execute(RequestExecutor<T,E> executor,
       String uri,
       E data)向微信端发送请求,在这里执行的策略是当发生access_token过期时才去刷新,然后重新执行请求,而不是全局定时请求 | 
| <T,E> T | executeInternal(RequestExecutor<T,E> executor,
               String uri,
               E data) | 
| String | get(String url,
   String queryParam)当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求 | 
| String | getAccessToken()获取access_token, 不强制刷新access_token | 
| String | getAccessToken(boolean forceRefresh)
 获取access_token,本方法线程安全
 且在多线程同时刷新时只刷新一次,避免超出2000次/日的调用次数上限
 另:本service的所有方法都会在access_token过期是调用此方法
 程序员在非必要情况下尽量不要主动调用此方法
 详情请见: http://mp.weixin.qq.com/wiki? | 
| WxMaMediaService | getMediaService()返回素材相关接口方法的实现类对象,以方便调用其各个接口 | 
| WxMaMsgService | getMsgService()返回消息(客服消息和模版消息)发送接口方法实现类,以方便调用其各个接口 | 
| WxMaQrcodeService | getQrcodeService()返回二维码相关接口方法的实现类对象,以方便调用其各个接口 | 
| RequestHttp | getRequestHttp()请求http请求相关信息 | 
| org.apache.http.impl.client.CloseableHttpClient | getRequestHttpClient() | 
| org.apache.http.HttpHost | getRequestHttpProxy() | 
| HttpType | getRequestType() | 
| WxMaUserService | getUserService()返回用户相关接口方法的实现类对象,以方便调用其各个接口 | 
| WxMaConfig | getWxMaConfig()获取WxMaConfig 对象 | 
| void | initHttp()初始化http请求对象 | 
| String | post(String url,
    String postData)当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的POST请求 | 
| void | setMaxRetryTimes(int maxRetryTimes)
 设置当微信系统响应系统繁忙时,最大重试次数
 默认:5次
  | 
| void | setRetrySleepMillis(int retrySleepMillis)
 设置当微信系统响应系统繁忙时,要等待多少 retrySleepMillis(ms) * 2^(重试次数 - 1) 再发起重试
 默认:1000ms
  | 
| void | setWxMaConfig(WxMaConfig wxConfigProvider)注入  WxMaConfig的实现 | 
public org.apache.http.impl.client.CloseableHttpClient getRequestHttpClient()
getRequestHttpClient 在接口中 RequestHttp<org.apache.http.impl.client.CloseableHttpClient,org.apache.http.HttpHost>public org.apache.http.HttpHost getRequestHttpProxy()
getRequestHttpProxy 在接口中 RequestHttp<org.apache.http.impl.client.CloseableHttpClient,org.apache.http.HttpHost>public HttpType getRequestType()
getRequestType 在接口中 RequestHttp<org.apache.http.impl.client.CloseableHttpClient,org.apache.http.HttpHost>public void initHttp()
WxMaServiceinitHttp 在接口中 WxMaServicepublic RequestHttp getRequestHttp()
WxMaServicegetRequestHttp 在接口中 WxMaServicepublic String getAccessToken(boolean forceRefresh) throws WxErrorException
WxMaService获取access_token,本方法线程安全 且在多线程同时刷新时只刷新一次,避免超出2000次/日的调用次数上限 另:本service的所有方法都会在access_token过期是调用此方法 程序员在非必要情况下尽量不要主动调用此方法 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140183&token=&lang=zh_CN
getAccessToken 在接口中 WxMaServiceforceRefresh - 强制刷新WxErrorExceptionpublic boolean checkSignature(String timestamp, String nonce, String signature)
WxMaService验证消息的确来自微信服务器 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421135319&token=&lang=zh_CN
checkSignature 在接口中 WxMaServicepublic String getAccessToken() throws WxErrorException
WxMaServicegetAccessToken 在接口中 WxMaServiceWxErrorExceptionWxMaService.getAccessToken(boolean)public String get(String url, String queryParam) throws WxErrorException
WxMaServiceget 在接口中 WxMaServiceWxErrorExceptionpublic String post(String url, String postData) throws WxErrorException
WxMaServicepost 在接口中 WxMaServiceWxErrorExceptionpublic <T,E> T execute(RequestExecutor<T,E> executor, String uri, E data) throws WxErrorException
execute 在接口中 WxMaServiceWxErrorExceptionpublic <T,E> T executeInternal(RequestExecutor<T,E> executor, String uri, E data) throws WxErrorException
WxErrorExceptionpublic WxMaConfig getWxMaConfig()
WxMaServicegetWxMaConfig 在接口中 WxMaServicepublic void setWxMaConfig(WxMaConfig wxConfigProvider)
WxMaServiceWxMaConfig 的实现setWxMaConfig 在接口中 WxMaServicepublic void setRetrySleepMillis(int retrySleepMillis)
WxMaService设置当微信系统响应系统繁忙时,要等待多少 retrySleepMillis(ms) * 2^(重试次数 - 1) 再发起重试 默认:1000ms
setRetrySleepMillis 在接口中 WxMaServicepublic void setMaxRetryTimes(int maxRetryTimes)
WxMaService设置当微信系统响应系统繁忙时,最大重试次数 默认:5次
setMaxRetryTimes 在接口中 WxMaServicepublic WxMaMsgService getMsgService()
WxMaServicegetMsgService 在接口中 WxMaServicepublic WxMaMediaService getMediaService()
WxMaServicegetMediaService 在接口中 WxMaServicepublic WxMaUserService getUserService()
WxMaServicegetUserService 在接口中 WxMaServicepublic WxMaQrcodeService getQrcodeService()
WxMaServicegetQrcodeService 在接口中 WxMaServiceCopyright © 2017. All rights reserved.