49
|
1 package christie.topology.node;
|
|
2
|
|
3
|
|
4 import christie.annotation.Peek;
|
|
5 import christie.annotation.Take;
|
|
6 import christie.codegear.CodeGear;
|
|
7 import christie.codegear.CodeGearManager;
|
|
8 import christie.daemon.IncomingTcpConnection;
|
|
9
|
|
10 public class IncomingReverseKey extends CodeGear {
|
|
11
|
|
12 @Take
|
|
13 String reverseKey;
|
|
14
|
61
|
15 @Take
|
|
16 int reverseKeyPort;
|
|
17
|
|
18 @Take
|
|
19 String reverseKeyHostName;
|
|
20
|
|
21
|
49
|
22 @Peek
|
|
23 int reverseCount;
|
|
24
|
|
25 @Override
|
|
26 protected void run(CodeGearManager cgm) {
|
|
27 //String from = this.reverseKey.from;
|
61
|
28
|
49
|
29 //IncomingTcpConnection s = DataSegment.getAccept(from);
|
|
30 //if (s != null) s.setReverseKey(reverseKey);
|
61
|
31 cgm.createRemoteDGM(reverseKey,reverseKeyHostName,reverseKeyPort);
|
49
|
32
|
|
33 reverseCount++;
|
|
34 getLocalDGM().put( "reverseCount", reverseCount);
|
|
35 cgm.setup(new IncomingReverseKey());
|
|
36 }
|
|
37
|
|
38 }
|