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