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.service.Service;
16
17
18
19
20
21
22 public class ServiceNotification extends ServerNotification implements BlockingServerEvent
23 {
24
25
26
27 private static final long serialVersionUID = -8575741816897936674L;
28 public static final int SERVICE_INITIALISED = SERVICE_EVENT_ACTION_START_RANGE + 1;
29 public static final int SERVICE_STARTED = SERVICE_EVENT_ACTION_START_RANGE + 2;
30 public static final int SERVICE_STOPPED = SERVICE_EVENT_ACTION_START_RANGE + 3;
31 public static final int SERVICE_PAUSED = SERVICE_EVENT_ACTION_START_RANGE + 4;
32 public static final int SERVICE_RESUMED = SERVICE_EVENT_ACTION_START_RANGE + 5;
33 public static final int SERVICE_DISPOSED = SERVICE_EVENT_ACTION_START_RANGE + 6;
34
35 static {
36 registerAction("service initialised", SERVICE_INITIALISED);
37 registerAction("service started", SERVICE_STARTED);
38 registerAction("service stopped", SERVICE_STOPPED);
39 registerAction("service paused", SERVICE_PAUSED);
40 registerAction("service resumed", SERVICE_RESUMED);
41 registerAction("service disposed", SERVICE_DISPOSED);
42 }
43
44 public ServiceNotification(Service message, int action)
45 {
46 super(message.getName(), action);
47 resourceIdentifier = message.getName();
48 }
49 }