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 | 0 | registerAction("registry initialising", REGISTRY_INITIALISING); |
38 | 0 | registerAction("registry initialised", REGISTRY_INITIALISED); |
39 | 0 | registerAction("registry disposing", REGISTRY_DISPOSING); |
40 | 0 | registerAction("registry disposed", REGISTRY_DISPOSED); |
41 | 0 | } |
42 | |
|
43 | |
public RegistryNotification(Registry registry, String action) |
44 | |
{ |
45 | 0 | this(registry, getActionId(action)); |
46 | 0 | } |
47 | |
|
48 | |
public RegistryNotification(Registry registry, int action) |
49 | |
{ |
50 | 0 | super(registry.getRegistryId(), action); |
51 | 0 | resourceIdentifier = registry.getRegistryId(); |
52 | 0 | } |
53 | |
|
54 | |
|
55 | |
public String toString() |
56 | |
{ |
57 | 0 | return EVENT_NAME + "{" + "action=" + getActionName(action) + ", resourceId=" + resourceIdentifier |
58 | |
+ ", timestamp=" + timestamp + "}"; |
59 | |
} |
60 | |
} |