1
2
3
4
5
6
7
8
9
10
11 package org.mule.context.notification;
12
13 import org.mule.api.context.notification.ServerNotification;
14 import org.mule.api.registry.Registry;
15
16
17
18
19
20
21
22
23
24 public class RegistryNotification extends ServerNotification
25 {
26
27
28
29 private static final long serialVersionUID = -3246036188021581121L;
30
31 public static final int REGISTRY_INITIALISING = REGISTRY_EVENT_ACTION_START_RANGE + 1;
32 public static final int REGISTRY_INITIALISED = REGISTRY_EVENT_ACTION_START_RANGE + 2;
33 public static final int REGISTRY_DISPOSING = REGISTRY_EVENT_ACTION_START_RANGE + 3;
34 public static final int REGISTRY_DISPOSED = REGISTRY_EVENT_ACTION_START_RANGE + 4;
35
36 static {
37 registerAction("registry initialising", REGISTRY_INITIALISING);
38 registerAction("registry initialised", REGISTRY_INITIALISED);
39 registerAction("registry disposing", REGISTRY_DISPOSING);
40 registerAction("registry disposed", REGISTRY_DISPOSED);
41 }
42
43 public RegistryNotification(Registry registry, String action)
44 {
45 this(registry, getActionId(action));
46 }
47
48 public RegistryNotification(Registry registry, int action)
49 {
50 super(registry.getRegistryId(), action);
51 resourceIdentifier = registry.getRegistryId();
52 }
53
54
55 @Override
56 public String toString()
57 {
58 return EVENT_NAME + "{" + "action=" + getActionName(action) + ", resourceId=" + resourceIdentifier
59 + ", timestamp=" + timestamp + "}";
60 }
61 }