1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.context.notification; |
8 | |
|
9 | |
import org.mule.api.context.notification.BlockingServerEvent; |
10 | |
import org.mule.api.context.notification.ServerNotification; |
11 | |
import org.mule.api.model.Model; |
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
public class ModelNotification extends ServerNotification implements BlockingServerEvent |
20 | |
{ |
21 | |
|
22 | |
|
23 | |
|
24 | |
private static final long serialVersionUID = -1954880336427554435L; |
25 | |
|
26 | |
public static final int MODEL_INITIALISED = MODEL_EVENT_ACTION_START_RANGE + 2; |
27 | |
public static final int MODEL_STARTED = MODEL_EVENT_ACTION_START_RANGE + 6; |
28 | |
public static final int MODEL_STOPPED = MODEL_EVENT_ACTION_START_RANGE + 8; |
29 | |
public static final int MODEL_DISPOSED = MODEL_EVENT_ACTION_START_RANGE + 10; |
30 | |
|
31 | |
static { |
32 | 0 | registerAction("model initialised", MODEL_INITIALISED); |
33 | 0 | registerAction("model started", MODEL_STARTED); |
34 | 0 | registerAction("model stopped", MODEL_STOPPED); |
35 | 0 | registerAction("model disposed", MODEL_DISPOSED); |
36 | 0 | } |
37 | |
|
38 | |
public ModelNotification(Model model, int action) |
39 | |
{ |
40 | 0 | super(model.getName(), action); |
41 | 0 | resourceIdentifier = model.getName(); |
42 | 0 | } |
43 | |
} |