annotate src/main/java/christie/topology/node/IncomingConnectionInfo.java @ 96:bf6ab64325f9

add Constoractor
author akahori
date Mon, 17 Sep 2018 11:20:26 +0900
parents 87a203c99177
children 8949d0ecf1f6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
1 package christie.topology.node;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
2
fd944876257b add node and keepalive
akahori
parents:
diff changeset
3
66
4e2453333508 del IncomingAbstractHostName
akahori
parents: 65
diff changeset
4 import christie.annotation.Peek;
65
5deea416f980 fix variable name
akahori
parents: 61
diff changeset
5 import christie.annotation.Take;
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
6 import christie.codegear.CodeGear;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
7 import christie.codegear.CodeGearManager;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
8 import christie.topology.HostMessage;
88
e4d16deb9627 del Logger
akahori
parents: 76
diff changeset
9
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
10
fd944876257b add node and keepalive
akahori
parents:
diff changeset
11 public class IncomingConnectionInfo extends CodeGear {
66
4e2453333508 del IncomingAbstractHostName
akahori
parents: 65
diff changeset
12 @Peek
4e2453333508 del IncomingAbstractHostName
akahori
parents: 65
diff changeset
13 String nodeName;
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
14
65
5deea416f980 fix variable name
akahori
parents: 61
diff changeset
15 @Take
5deea416f980 fix variable name
akahori
parents: 61
diff changeset
16 HostMessage remoteNodeInfo;
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
17
66
4e2453333508 del IncomingAbstractHostName
akahori
parents: 65
diff changeset
18 public IncomingConnectionInfo() {
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
19 }
fd944876257b add node and keepalive
akahori
parents:
diff changeset
20
fd944876257b add node and keepalive
akahori
parents:
diff changeset
21 @Override
fd944876257b add node and keepalive
akahori
parents:
diff changeset
22 protected void run(CodeGearManager cgm) {
94
87a203c99177 update HostMessage refactor
akahori
parents: 88
diff changeset
23 String connectionName = remoteNodeInfo.getConnectionName();
61
20d4c0cce914 refactor Topology Node
akahori
parents: 59
diff changeset
24
94
87a203c99177 update HostMessage refactor
akahori
parents: 88
diff changeset
25 cgm.createRemoteDGM(connectionName,
87a203c99177 update HostMessage refactor
akahori
parents: 88
diff changeset
26 remoteNodeInfo.getHostName(),
87a203c99177 update HostMessage refactor
akahori
parents: 88
diff changeset
27 remoteNodeInfo.getPort());
87a203c99177 update HostMessage refactor
akahori
parents: 88
diff changeset
28 getDGM(connectionName).put("reverseNodeName", nodeName);
87a203c99177 update HostMessage refactor
akahori
parents: 88
diff changeset
29
87a203c99177 update HostMessage refactor
akahori
parents: 88
diff changeset
30 getLocalDGM().put("cMember", connectionName);
68
37601b98f0da update TopologyNode
akahori
parents: 66
diff changeset
31 cgm.setup(new CreateConnectionList());
66
4e2453333508 del IncomingAbstractHostName
akahori
parents: 65
diff changeset
32 cgm.setup(new IncomingConnectionInfo());
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
33 }
fd944876257b add node and keepalive
akahori
parents:
diff changeset
34
fd944876257b add node and keepalive
akahori
parents:
diff changeset
35 }