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