Package com.zone.weixin4j.dispatcher
Class DefaultMessageMatcher
- java.lang.Object
-
- com.zone.weixin4j.dispatcher.DefaultMessageMatcher
-
- All Implemented Interfaces:
WeixinMessageMatcher
public class DefaultMessageMatcher extends Object implements WeixinMessageMatcher
默认MessageMatcher实现(可以改进)- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
-
-
Constructor Summary
Constructors Constructor Description DefaultMessageMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends WeixinMessage>
match(WeixinMessageKey messageKey)
匹配消息类型void
regist(WeixinMessageKey messageKey, Class<? extends WeixinMessage> messageClass)
注册消息类型「程序没有及时更新而微信又产生了新的消息类型」
-
-
-
Method Detail
-
match
public Class<? extends WeixinMessage> match(WeixinMessageKey messageKey)
Description copied from interface:WeixinMessageMatcher
匹配消息类型- Specified by:
match
in interfaceWeixinMessageMatcher
- Parameters:
messageKey
- 消息key- Returns:
- 消息类型
-
regist
public void regist(WeixinMessageKey messageKey, Class<? extends WeixinMessage> messageClass)
Description copied from interface:WeixinMessageMatcher
注册消息类型「程序没有及时更新而微信又产生了新的消息类型」- Specified by:
regist
in interfaceWeixinMessageMatcher
- Parameters:
messageKey
- 消息keymessageClass
- 消息类型
-
-