public abstract class WxMaServiceAbstractImpl<H,P> extends Object implements WxMaService, RequestHttp<H,P>
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.slf4j.Logger |
log |
GET_ACCESS_TOKEN_URL| 构造器和说明 |
|---|
WxMaServiceAbstractImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
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
|
WxMaMediaService |
getMediaService()
返回素材相关接口方法的实现类对象,以方便调用其各个接口
|
WxMaMsgService |
getMsgService()
返回消息(客服消息和模版消息)发送接口方法实现类,以方便调用其各个接口
|
WxMaQrcodeService |
getQrcodeService()
返回二维码相关接口方法的实现类对象,以方便调用其各个接口
|
WxMaUserService |
getUserService()
返回用户相关接口方法的实现类对象,以方便调用其各个接口
|
WxMaConfig |
getWxMaConfig()
获取WxMaConfig 对象
|
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 的实现 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccessToken, getRequestHttp, initHttpgetRequestHttpClient, getRequestHttpProxy, getRequestTypepublic 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.