Package com.foxinmy.weixin4j.handler
Interface WeixinMessageHandler
-
- All Known Implementing Classes:
DebugMessageHandler
,MessageHandlerAdapter
,MultipleMessageHandlerAdapter
public interface WeixinMessageHandler
微信消息处理器- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
- See Also:
MessageHandlerAdapter
,MultipleMessageHandlerAdapter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canHandle(WeixinRequest request, WeixinMessage message, Set<String> nodeNames)
能否处理请求WeixinResponse
doHandle(WeixinRequest request, WeixinMessage message)
处理请求int
weight()
用于匹配到多个MessageHandler时权重降序排列,数字越大优先级越高
-
-
-
Method Detail
-
canHandle
boolean canHandle(WeixinRequest request, WeixinMessage message, Set<String> nodeNames)
能否处理请求- Parameters:
request
- 微信请求message
- 微信消息nodeNames
- 节点名称集合- Returns:
- true则执行doHandle
-
doHandle
WeixinResponse doHandle(WeixinRequest request, WeixinMessage message)
处理请求- Parameters:
request
- 微信请求message
- 微信消息- Returns:
- 回复内容
-
weight
int weight()
用于匹配到多个MessageHandler时权重降序排列,数字越大优先级越高- Returns:
- 权重
-
-