1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
package org.mule.transport.servlet.events; |
11 | |
|
12 | |
import org.mule.api.context.notification.BlockingServerEvent; |
13 | |
import org.mule.context.notification.CustomNotification; |
14 | |
|
15 | |
import javax.servlet.ServletContext; |
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
public class ServletContextNotification extends CustomNotification implements BlockingServerEvent |
21 | |
{ |
22 | |
|
23 | |
|
24 | |
|
25 | |
private static final long serialVersionUID = -3246036188011581121L; |
26 | |
|
27 | |
public static final int SERVLET_CONTEXT_START_RANGE = CUSTOM_EVENT_ACTION_START_RANGE + 1200; |
28 | |
public static final int SERVLET_CONTEXT_INITIALISED = SERVLET_CONTEXT_START_RANGE + 1; |
29 | |
public static final int SERVLET_CONTEXT_DESTROYED = SERVLET_CONTEXT_START_RANGE + 2; |
30 | |
|
31 | |
static { |
32 | 0 | registerAction("servlet context initialising", SERVLET_CONTEXT_INITIALISED); |
33 | 0 | registerAction("servlet context destroyed", SERVLET_CONTEXT_DESTROYED); |
34 | 0 | } |
35 | |
|
36 | |
public ServletContextNotification(ServletContext context, int action) |
37 | |
{ |
38 | 0 | super(context, action, context.getServletContextName()); |
39 | 0 | } |
40 | |
|
41 | |
public String toString() |
42 | |
{ |
43 | 0 | return EVENT_NAME + "{" + "action=" + getActionName(action) + ", resourceId=" + resourceIdentifier |
44 | |
+ ", timestamp=" + timestamp + "}"; |
45 | |
} |
46 | |
|
47 | |
} |