Package com.zone.weixin4j.dispatcher
Class MessageHandlerExecutor
- java.lang.Object
-
- com.zone.weixin4j.dispatcher.MessageHandlerExecutor
-
public class MessageHandlerExecutor extends Object
微信消息的处理执行- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
- See Also:
WeixinMessageHandler
,WeixinMessageInterceptor
-
-
Constructor Summary
Constructors Constructor Description MessageHandlerExecutor(WeixinMessageHandler messageHandler, WeixinMessageInterceptor[] messageInterceptors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyPostHandle(WeixinRequest request, WeixinResponse response, WeixinMessage message)
MessageHandler处理玩请求后的动作boolean
applyPreHandle(WeixinRequest request, WeixinMessage message)
执行预拦截动作WeixinMessageHandler
getMessageHandler()
void
triggerAfterCompletion(WeixinRequest request, WeixinResponse response, WeixinMessage message, Exception exception)
全部执行完毕后触发
-
-
-
Constructor Detail
-
MessageHandlerExecutor
public MessageHandlerExecutor(WeixinMessageHandler messageHandler, WeixinMessageInterceptor[] messageInterceptors)
-
-
Method Detail
-
getMessageHandler
public WeixinMessageHandler getMessageHandler()
-
applyPreHandle
public boolean applyPreHandle(WeixinRequest request, WeixinMessage message) throws WeixinException
执行预拦截动作- Parameters:
request
- 微信请求信息message
- 微信消息- Returns:
- true则继续执行往下执行
- Throws:
WeixinException
-
applyPostHandle
public void applyPostHandle(WeixinRequest request, WeixinResponse response, WeixinMessage message) throws WeixinException
MessageHandler处理玩请求后的动作- Parameters:
request
- 微信请求response
- 处理后的响应message
- 微信消息- Throws:
WeixinException
-
triggerAfterCompletion
public void triggerAfterCompletion(WeixinRequest request, WeixinResponse response, WeixinMessage message, Exception exception) throws WeixinException
全部执行完毕后触发- Parameters:
request
- 微信请求response
- 微信响应 可能为空message
- 微信消息exception
- 处理时可能的异常- Throws:
WeixinException
-
-