Package com.zone.weixin4j.handler
Class DebugMessageHandler
- java.lang.Object
-
- com.zone.weixin4j.handler.DebugMessageHandler
-
- All Implemented Interfaces:
WeixinMessageHandler
public class DebugMessageHandler extends Object implements WeixinMessageHandler
调试消息处理器- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
-
-
Field Summary
Fields Modifier and Type Field Description static DebugMessageHandler
global
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canHandle(WeixinRequest request, WeixinMessage message, Set<String> nodeNames)
能否处理请求WeixinResponse
doHandle(WeixinRequest request, WeixinMessage message, Set<String> nodeNames)
处理请求int
weight()
用于匹配到多个MessageHandler时权重降序排列,数字越大优先级越高
-
-
-
Field Detail
-
global
public static final DebugMessageHandler global
-
-
Method Detail
-
canHandle
public boolean canHandle(WeixinRequest request, WeixinMessage message, Set<String> nodeNames) throws WeixinException
Description copied from interface:WeixinMessageHandler
能否处理请求- Specified by:
canHandle
in interfaceWeixinMessageHandler
- Parameters:
request
- 微信请求message
- 微信消息nodeNames
- 节点名称集合- Returns:
- true则执行doHandle
- Throws:
WeixinException
-
doHandle
public WeixinResponse doHandle(WeixinRequest request, WeixinMessage message, Set<String> nodeNames) throws WeixinException
Description copied from interface:WeixinMessageHandler
处理请求- Specified by:
doHandle
in interfaceWeixinMessageHandler
- Parameters:
request
- 微信请求message
- 微信消息nodeNames
- 节点名称集合- Returns:
- 回复内容
- Throws:
WeixinException
-
weight
public int weight()
Description copied from interface:WeixinMessageHandler
用于匹配到多个MessageHandler时权重降序排列,数字越大优先级越高- Specified by:
weight
in interfaceWeixinMessageHandler
- Returns:
- 权重
-
-