1 package com.zone.weixin4j.interceptor;
2
3 import com.zone.weixin4j.exception.WeixinException;
4 import com.zone.weixin4j.handler.WeixinMessageHandler;
5 import com.zone.weixin4j.request.WeixinMessage;
6 import com.zone.weixin4j.request.WeixinRequest;
7 import com.zone.weixin4j.response.WeixinResponse;
8
9
10
11
12
13
14
15
16
17
18 public interface WeixinMessageInterceptor {
19
20
21
22
23
24
25
26
27
28
29 boolean preHandle(WeixinRequest request,
30 WeixinMessage message, WeixinMessageHandler handler)
31 throws WeixinException;
32
33
34
35
36
37
38
39
40
41
42 void postHandle(WeixinRequest request,
43 WeixinResponse response, WeixinMessage message,
44 WeixinMessageHandler handler) throws WeixinException;
45
46
47
48
49
50
51
52
53
54
55 void afterCompletion(WeixinRequest request,
56 WeixinResponse response, WeixinMessage message,
57 WeixinMessageHandler handler, Exception exception)
58 throws WeixinException;
59
60
61
62
63
64
65 int weight();
66 }