1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.context.notification; |
12 | |
|
13 | |
import org.mule.api.context.notification.BlockingServerEvent; |
14 | |
import org.mule.api.context.notification.ServerNotification; |
15 | |
import org.mule.api.model.Model; |
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
public class ModelNotification extends ServerNotification implements BlockingServerEvent |
24 | |
{ |
25 | |
|
26 | |
|
27 | |
|
28 | |
private static final long serialVersionUID = -1954880336427554435L; |
29 | |
|
30 | |
public static final int MODEL_INITIALISING = MODEL_EVENT_ACTION_START_RANGE + 1; |
31 | |
public static final int MODEL_INITIALISED = MODEL_EVENT_ACTION_START_RANGE + 2; |
32 | |
public static final int MODEL_INITIALISING_LISTENERS = MODEL_EVENT_ACTION_START_RANGE + 3; |
33 | |
public static final int MODEL_INITIALISED_LISTENERS = MODEL_EVENT_ACTION_START_RANGE + 4; |
34 | |
public static final int MODEL_STARTING = MODEL_EVENT_ACTION_START_RANGE + 5; |
35 | |
public static final int MODEL_STARTED = MODEL_EVENT_ACTION_START_RANGE + 6; |
36 | |
public static final int MODEL_STOPPING = MODEL_EVENT_ACTION_START_RANGE + 7; |
37 | |
public static final int MODEL_STOPPED = MODEL_EVENT_ACTION_START_RANGE + 8; |
38 | |
public static final int MODEL_DISPOSING = MODEL_EVENT_ACTION_START_RANGE + 9; |
39 | |
public static final int MODEL_DISPOSED = MODEL_EVENT_ACTION_START_RANGE + 10; |
40 | |
|
41 | |
static { |
42 | 2 | registerAction("model initialising", MODEL_INITIALISING); |
43 | 2 | registerAction("model initialised", MODEL_INITIALISED); |
44 | 2 | registerAction("model initialising listener", MODEL_INITIALISING_LISTENERS); |
45 | 2 | registerAction("model initialised listener", MODEL_INITIALISED_LISTENERS); |
46 | 2 | registerAction("model starting", MODEL_STARTING); |
47 | 2 | registerAction("model started", MODEL_STARTED); |
48 | 2 | registerAction("model stopping", MODEL_STOPPING); |
49 | 2 | registerAction("model stopped", MODEL_STOPPED); |
50 | 2 | registerAction("model disposing", MODEL_DISPOSING); |
51 | 2 | registerAction("model disposed", MODEL_DISPOSED); |
52 | 2 | } |
53 | |
|
54 | |
public ModelNotification(Model model, int action) |
55 | |
{ |
56 | 5484 | super(model, action); |
57 | 5484 | resourceIdentifier = model.getName(); |
58 | 5484 | } |
59 | |
|
60 | |
protected String getPayloadToString() |
61 | |
{ |
62 | 0 | return ((Model) source).getName(); |
63 | |
} |
64 | |
} |