com.github.sd4324530.fastweixin.servlet
类 QYWeixinSupport

java.lang.Object
  继承者 com.github.sd4324530.fastweixin.servlet.QYWeixinSupport
直接已知子类:
QYWeixinControllerSupport

public abstract class QYWeixinSupport
extends Object

==================================================================== 上海聚攒软件开发有限公司 --------------------------------------------------------------------

版本:
1.0.beta ====================================================================
作者:
Nottyjay

构造方法摘要
QYWeixinSupport()
           
 
方法摘要
 void bindServer(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          绑定服务器的方法
protected abstract  String getAESKey()
          加密的密钥,消息解密时需要
protected abstract  String getCropId()
          子类提供cropId用于绑定微信企业平台
protected abstract  String getToken()
          子类提供token用于绑定微信企业平台
protected  QYBaseRespMsg handleBatchJobEvent(QYBatchJobEvent event)
          处理异步任务通知事件,有需要时子类重写
protected  QYBaseRespMsg handleDefaultEvent(QYBaseEvent event)
           
protected  QYBaseRespMsg handleDefaultMsg(QYBaseReqMsg msg)
           
protected  QYBaseRespMsg handleEnterAgentEvent(QYEnterAgentEvent event)
          处理用户进入应用事件,有需要时子类重写
protected  QYBaseRespMsg handleImageMsg(QYImageReqMsg msg)
          处理图片消息,有需要时子类重写
protected  QYBaseRespMsg handleLocationEvent(QYLocationEvent event)
          处理地理位置事件,有需要时子类重写
protected  QYBaseRespMsg handleLocationMsg(QYLocationReqMsg msg)
          处理地理位置消息,有需要时子类重写
protected  QYBaseRespMsg handleMenuClickEvent(QYMenuEvent event)
          处理菜单点击事件,有需要时子类重写
protected  QYBaseRespMsg handleMenuViewEvent(QYMenuEvent event)
          处理菜单跳转事件,有需要时子类重写
protected  QYBaseRespMsg handleScanCodeEvent(QYScanCodeEvent event)
          处理菜单扫描推事件,有需要时子类重写
protected  QYBaseRespMsg handleSendPicsInfoEvent(QYSendPicInfoEvent event)
          处理菜单弹出相册事件,有需要时子类重写
protected  QYBaseRespMsg handleShortVideoMsg(QYVideoReqMsg msg)
          处理小视频消息,有需要时子类重写
protected  QYBaseRespMsg handleSubScribe(QYBaseEvent event)
          处理添加关注事件,有需要时子类重写
protected  QYBaseRespMsg handleTextMsg(QYTextReqMsg msg)
          处理文本消息,有需要时子类重写
protected  QYBaseRespMsg handleUnsubscribe(QYBaseEvent event)
          处理取消关注事件,有需要时子类重写
protected  QYBaseRespMsg handleVideoMsg(QYVideoReqMsg msg)
          处理视频消息,有需要时子类重写
protected  QYBaseRespMsg handleVoiceMsg(QYVoiceReqMsg msg)
          处理语音消息,有需要时子类重写
protected  List<QYEventHandle> initEventHandles()
          子类重写,加入自定义的微信事件处理器,细化消息的处理
protected  List<QYMessageHandle> initMessageHandles()
          子类重写,加入自定义的微信消息处理器,细化消息的处理
 String processRequest(javax.servlet.http.HttpServletRequest request)
          处理微信服务器发来的请求方法
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

QYWeixinSupport

public QYWeixinSupport()
方法详细信息

getToken

protected abstract String getToken()
子类提供token用于绑定微信企业平台

返回:
token

getCropId

protected abstract String getCropId()
子类提供cropId用于绑定微信企业平台

返回:
cropId

getAESKey

protected abstract String getAESKey()
加密的密钥,消息解密时需要

返回:
密钥

initMessageHandles

protected List<QYMessageHandle> initMessageHandles()
子类重写,加入自定义的微信消息处理器,细化消息的处理

返回:
微信消息处理器列表

initEventHandles

protected List<QYEventHandle> initEventHandles()
子类重写,加入自定义的微信事件处理器,细化消息的处理

返回:
微信事件处理器列表

bindServer

public void bindServer(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
绑定服务器的方法

参数:
request - 请求
response - 响应

processRequest

public String processRequest(javax.servlet.http.HttpServletRequest request)
处理微信服务器发来的请求方法

参数:
request - http请求对象
返回:
处理消息的结果,已经是接口要求的XML的报文了

handleTextMsg

protected QYBaseRespMsg handleTextMsg(QYTextReqMsg msg)
处理文本消息,有需要时子类重写

参数:
msg - 请求消息对象
返回:
响应消息对象

handleImageMsg

protected QYBaseRespMsg handleImageMsg(QYImageReqMsg msg)
处理图片消息,有需要时子类重写

参数:
msg - 请求消息对象
返回:
响应消息对象

handleVoiceMsg

protected QYBaseRespMsg handleVoiceMsg(QYVoiceReqMsg msg)
处理语音消息,有需要时子类重写

参数:
msg - 请求消息对象
返回:
响应消息对象

handleVideoMsg

protected QYBaseRespMsg handleVideoMsg(QYVideoReqMsg msg)
处理视频消息,有需要时子类重写

参数:
msg - 请求消息对象
返回:
响应消息对象

handleShortVideoMsg

protected QYBaseRespMsg handleShortVideoMsg(QYVideoReqMsg msg)
处理小视频消息,有需要时子类重写

参数:
msg - 请求消息对象
返回:
响应消息对象

handleLocationMsg

protected QYBaseRespMsg handleLocationMsg(QYLocationReqMsg msg)
处理地理位置消息,有需要时子类重写

参数:
msg - 请求消息对象
返回:
响应消息对象

handleLocationEvent

protected QYBaseRespMsg handleLocationEvent(QYLocationEvent event)
处理地理位置事件,有需要时子类重写

参数:
event - 地理位置事件对象
返回:
响应消息对象

handleMenuClickEvent

protected QYBaseRespMsg handleMenuClickEvent(QYMenuEvent event)
处理菜单点击事件,有需要时子类重写

参数:
event - 菜单点击事件对象
返回:
响应消息对象

handleMenuViewEvent

protected QYBaseRespMsg handleMenuViewEvent(QYMenuEvent event)
处理菜单跳转事件,有需要时子类重写

参数:
event - 菜单跳转事件对象
返回:
响应消息对象

handleScanCodeEvent

protected QYBaseRespMsg handleScanCodeEvent(QYScanCodeEvent event)
处理菜单扫描推事件,有需要时子类重写

参数:
event -
返回:

handleSendPicsInfoEvent

protected QYBaseRespMsg handleSendPicsInfoEvent(QYSendPicInfoEvent event)
处理菜单弹出相册事件,有需要时子类重写

参数:
event - 菜单弹出相册事件
返回:
响应的消息对象

handleEnterAgentEvent

protected QYBaseRespMsg handleEnterAgentEvent(QYEnterAgentEvent event)
处理用户进入应用事件,有需要时子类重写

参数:
event - 添加应用事件对象
返回:
响应的消息对象

handleBatchJobEvent

protected QYBaseRespMsg handleBatchJobEvent(QYBatchJobEvent event)
处理异步任务通知事件,有需要时子类重写

参数:
event - 添加通知事件对象
返回:
响应的消息对象

handleSubScribe

protected QYBaseRespMsg handleSubScribe(QYBaseEvent event)
处理添加关注事件,有需要时子类重写

参数:
event - 添加关注事件对象
返回:
响应消息对象

handleUnsubscribe

protected QYBaseRespMsg handleUnsubscribe(QYBaseEvent event)
处理取消关注事件,有需要时子类重写

参数:
event - 取消关注事件对象
返回:
响应消息对象

handleDefaultMsg

protected QYBaseRespMsg handleDefaultMsg(QYBaseReqMsg msg)

handleDefaultEvent

protected QYBaseRespMsg handleDefaultEvent(QYBaseEvent event)


Copyright © 2017. All rights reserved.