annotate src/main/java/christie/topology/node/IncomingReverseKey.java @ 61:20d4c0cce914

refactor Topology Node
author akahori
date Tue, 28 Aug 2018 18:56:45 +0900
parents fd944876257b
children 37601b98f0da
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
fd944876257b add node and keepalive
akahori
parents:
diff changeset
4 import christie.annotation.Peek;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
5 import christie.annotation.Take;
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.daemon.IncomingTcpConnection;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
9
fd944876257b add node and keepalive
akahori
parents:
diff changeset
10 public class IncomingReverseKey extends CodeGear {
fd944876257b add node and keepalive
akahori
parents:
diff changeset
11
fd944876257b add node and keepalive
akahori
parents:
diff changeset
12 @Take
fd944876257b add node and keepalive
akahori
parents:
diff changeset
13 String reverseKey;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
14
61
20d4c0cce914 refactor Topology Node
akahori
parents: 49
diff changeset
15 @Take
20d4c0cce914 refactor Topology Node
akahori
parents: 49
diff changeset
16 int reverseKeyPort;
20d4c0cce914 refactor Topology Node
akahori
parents: 49
diff changeset
17
20d4c0cce914 refactor Topology Node
akahori
parents: 49
diff changeset
18 @Take
20d4c0cce914 refactor Topology Node
akahori
parents: 49
diff changeset
19 String reverseKeyHostName;
20d4c0cce914 refactor Topology Node
akahori
parents: 49
diff changeset
20
20d4c0cce914 refactor Topology Node
akahori
parents: 49
diff changeset
21
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
22 @Peek
fd944876257b add node and keepalive
akahori
parents:
diff changeset
23 int reverseCount;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
24
fd944876257b add node and keepalive
akahori
parents:
diff changeset
25 @Override
fd944876257b add node and keepalive
akahori
parents:
diff changeset
26 protected void run(CodeGearManager cgm) {
fd944876257b add node and keepalive
akahori
parents:
diff changeset
27 //String from = this.reverseKey.from;
61
20d4c0cce914 refactor Topology Node
akahori
parents: 49
diff changeset
28
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
29 //IncomingTcpConnection s = DataSegment.getAccept(from);
fd944876257b add node and keepalive
akahori
parents:
diff changeset
30 //if (s != null) s.setReverseKey(reverseKey);
61
20d4c0cce914 refactor Topology Node
akahori
parents: 49
diff changeset
31 cgm.createRemoteDGM(reverseKey,reverseKeyHostName,reverseKeyPort);
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
32
fd944876257b add node and keepalive
akahori
parents:
diff changeset
33 reverseCount++;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
34 getLocalDGM().put( "reverseCount", reverseCount);
fd944876257b add node and keepalive
akahori
parents:
diff changeset
35 cgm.setup(new IncomingReverseKey());
fd944876257b add node and keepalive
akahori
parents:
diff changeset
36 }
fd944876257b add node and keepalive
akahori
parents:
diff changeset
37
fd944876257b add node and keepalive
akahori
parents:
diff changeset
38 }