1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.module.client.remoting.notification; |
12 | |
|
13 | |
import org.mule.api.MuleMessage; |
14 | |
import org.mule.api.context.notification.ServerNotification; |
15 | |
|
16 | |
import java.util.HashMap; |
17 | |
import java.util.Map; |
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
public class RemoteDispatcherNotification extends ServerNotification |
24 | |
{ |
25 | |
|
26 | |
|
27 | |
|
28 | |
private static final long serialVersionUID = -53091546441476249L; |
29 | |
|
30 | |
|
31 | |
public static final int REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE = 600; |
32 | |
|
33 | |
public static final int ACTION_RECEIVE = REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE + 1; |
34 | |
public static final int ACTION_DISPATCH = REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE + 2; |
35 | |
public static final int ACTION_SEND = REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE + 3; |
36 | |
public static final int ACTION_INVOKE = REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE + 4; |
37 | |
public static final int ACTION_WIRE_FORMAT = REMOTE_DISPATCHER_EVENT_ACTION_START_RANGE + 5; |
38 | |
|
39 | |
static { |
40 | 0 | registerAction("receive event", ACTION_RECEIVE); |
41 | 0 | registerAction("dispatch event", ACTION_DISPATCH); |
42 | 0 | registerAction("send event", ACTION_SEND); |
43 | 0 | registerAction("invoke component", ACTION_INVOKE); |
44 | 0 | registerAction("request wire format", ACTION_WIRE_FORMAT); |
45 | 0 | } |
46 | |
|
47 | 0 | private Map properties = new HashMap(); |
48 | |
private MuleMessage message; |
49 | |
|
50 | |
public RemoteDispatcherNotification(MuleMessage message, int action) |
51 | |
{ |
52 | 0 | super(message, action); |
53 | 0 | } |
54 | |
|
55 | |
public RemoteDispatcherNotification(MuleMessage message, int action, String resourceIdentifier) |
56 | |
{ |
57 | 0 | super(message, action, resourceIdentifier); |
58 | 0 | this.message = message; |
59 | 0 | } |
60 | |
|
61 | |
public MuleMessage getMessage() |
62 | |
{ |
63 | 0 | return message; |
64 | |
} |
65 | |
|
66 | |
public void setProperty(Object key, Object value) |
67 | |
{ |
68 | 0 | properties.put(key, value); |
69 | 0 | } |
70 | |
|
71 | |
public Object getProperty(Object key) |
72 | |
{ |
73 | 0 | return properties.get(key); |
74 | |
} |
75 | |
|
76 | |
public Map getProperties() |
77 | |
{ |
78 | 0 | return properties; |
79 | |
} |
80 | |
} |