1
2
3
4
5
6
7
8
9
10
11 package org.mule.context.notification;
12
13 import org.mule.api.context.notification.CustomNotificationListener;
14 import org.mule.api.context.notification.ServerNotification;
15
16
17
18
19
20
21
22
23
24
25
26 public class CustomNotification extends ServerNotification
27 {
28
29
30
31 private static final long serialVersionUID = 762448139858484536L;
32
33
34
35
36
37
38
39
40
41 public CustomNotification(Object message, int action)
42 {
43 super(message, action);
44 if (action < CUSTOM_EVENT_ACTION_START_RANGE && action > 0)
45 {
46 throw new IllegalArgumentException(
47 "Action range must be greater than CUSTOM_ACTION_START_RANGE ("
48 + CUSTOM_EVENT_ACTION_START_RANGE + ")");
49 }
50 }
51
52 public CustomNotification(Object message, int action, String resourceId)
53 {
54 super(message, action, resourceId);
55 if (action < CUSTOM_EVENT_ACTION_START_RANGE && action > 0)
56 {
57 throw new IllegalArgumentException(
58 "Action range must be greater than CUSTOM_ACTION_START_RANGE ("
59 + CUSTOM_EVENT_ACTION_START_RANGE + ")");
60 }
61 }
62
63 protected String[] getActionNames()
64 {
65 return new String[]{};
66 }
67 }