diff src/main/java/christie/topology/node/IncomingReverseKey.java @ 49:fd944876257b

add node and keepalive
author akahori
date Thu, 23 Aug 2018 09:29:05 +0900
parents
children 20d4c0cce914
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/christie/topology/node/IncomingReverseKey.java	Thu Aug 23 09:29:05 2018 +0900
@@ -0,0 +1,29 @@
+package christie.topology.node;
+
+
+import christie.annotation.Peek;
+import christie.annotation.Take;
+import christie.codegear.CodeGear;
+import christie.codegear.CodeGearManager;
+import christie.daemon.IncomingTcpConnection;
+
+public class IncomingReverseKey extends CodeGear {
+
+    @Take
+    String reverseKey;
+
+    @Peek
+    int reverseCount;
+
+    @Override
+    protected void run(CodeGearManager cgm) {
+        //String from = this.reverseKey.from;
+        //IncomingTcpConnection s = DataSegment.getAccept(from);
+        //if (s != null) s.setReverseKey(reverseKey);
+
+        reverseCount++;
+        getLocalDGM().put( "reverseCount", reverseCount);
+        cgm.setup(new IncomingReverseKey());
+    }
+
+}