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