49
|
1 package christie.topology.node;
|
|
2
|
|
3
|
66
|
4 import christie.annotation.Peek;
|
65
|
5 import christie.annotation.Take;
|
49
|
6 import christie.codegear.CodeGear;
|
|
7 import christie.codegear.CodeGearManager;
|
|
8 import christie.topology.HostMessage;
|
88
|
9
|
49
|
10
|
|
11 public class IncomingConnectionInfo extends CodeGear {
|
66
|
12 @Peek
|
|
13 String nodeName;
|
49
|
14
|
65
|
15 @Take
|
|
16 HostMessage remoteNodeInfo;
|
49
|
17
|
66
|
18 public IncomingConnectionInfo() {
|
49
|
19 }
|
|
20
|
|
21 @Override
|
|
22 protected void run(CodeGearManager cgm) {
|
94
|
23 String connectionName = remoteNodeInfo.getConnectionName();
|
61
|
24
|
94
|
25 cgm.createRemoteDGM(connectionName,
|
|
26 remoteNodeInfo.getHostName(),
|
|
27 remoteNodeInfo.getPort());
|
|
28 getDGM(connectionName).put("reverseNodeName", nodeName);
|
|
29
|
|
30 getLocalDGM().put("cMember", connectionName);
|
68
|
31 cgm.setup(new CreateConnectionList());
|
66
|
32 cgm.setup(new IncomingConnectionInfo());
|
49
|
33 }
|
|
34
|
|
35 }
|