Package com.zone.weixin4j.interceptor
Interface WeixinMessageInterceptor
-
- All Known Implementing Classes:
MessageInterceptorAdapter
public interface WeixinMessageInterceptor
微信消息拦截器- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
- See Also:
MessageInterceptorAdapter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
afterCompletion(WeixinRequest request, WeixinResponse response, WeixinMessage message, WeixinMessageHandler handler, Exception exception)
全部执行后void
postHandle(WeixinRequest request, WeixinResponse response, WeixinMessage message, WeixinMessageHandler handler)
执行handler后boolean
preHandle(WeixinRequest request, WeixinMessage message, WeixinMessageHandler handler)
执行handler前int
weight()
用于匹配到多个MessageHandler时权重降序排列,数字越大优先级越高
-
-
-
Method Detail
-
preHandle
boolean preHandle(WeixinRequest request, WeixinMessage message, WeixinMessageHandler handler) throws WeixinException
执行handler前- Parameters:
request
- 微信请求message
- 微信消息handler
- 消息处理器- Returns:
- 返回true执行下一个拦截器
- Throws:
WeixinException
-
postHandle
void postHandle(WeixinRequest request, WeixinResponse response, WeixinMessage message, WeixinMessageHandler handler) throws WeixinException
执行handler后- Parameters:
request
- 微信请求response
- 微信响应message
- 微信消息handler
- 消息处理器- Throws:
WeixinException
-
afterCompletion
void afterCompletion(WeixinRequest request, WeixinResponse response, WeixinMessage message, WeixinMessageHandler handler, Exception exception) throws WeixinException
全部执行后- Parameters:
request
- 微信请求message
- 微信消息handler
- 消息处理器exception
- 执行异常- Throws:
WeixinException
-
weight
int weight()
用于匹配到多个MessageHandler时权重降序排列,数字越大优先级越高- Returns:
- 权重
-
-