diff src/main/java/alice/topology/fix/FixTopology.java @ 478:cf345b10a21a dispose

bug fix
author sugi
date Tue, 02 Dec 2014 17:16:34 +0900
parents f644dc9e0589
children 8227a2fd5a55
line wrap: on
line diff
--- a/src/main/java/alice/topology/fix/FixTopology.java	Tue Dec 02 14:49:20 2014 +0900
+++ b/src/main/java/alice/topology/fix/FixTopology.java	Tue Dec 02 17:16:34 2014 +0900
@@ -19,7 +19,7 @@
     private Receiver info4 = ids.create(CommandType.TAKE); // parentManager
 
     public FixTopology() {
-        info.setKey("_DISCONNECT");
+        info.setKey("_DISCONNECTNODE");
         info1.setKey("topology");
         info2.setKey("hostCount");
         info3.setKey("nameTable");
@@ -29,7 +29,7 @@
     @SuppressWarnings("unchecked")
     @Override
     public void run() {
-        ConnectionInfo disconnect = info.asClass(ConnectionInfo.class);
+        ConnectionInfo disconnect = info.asClass(ConnectionInfo.class); // send Data is wrong.
         HashMap<String, HostMessage> nameTable = info3.asClass(HashMap.class);
         ParentManager manager = info4.asClass(ParentManager.class);
         HostMessage disconnectNode = nameTable.get(disconnect.nodeName);
@@ -85,6 +85,15 @@
         } else {
             // disconnect message already received.
         }
+
+        // need debug option
+        for (LinkedList<HostMessage> list :topology.values()){
+            System.out.print(list.get(0).remoteAbsName+" : ");
+            for (HostMessage host : list){
+                System.out.print("[ "+host.absName+" "+host.name+" "+host.port+" "+host.connectionName+" "+host.reverseName+" "+host.remoteAbsName+" ]");
+            }
+            System.out.println();
+        }
         ods.put(info1.key, topology);
         ods.put(info2.key, info2.getReceiveData());
         ods.put(info3.key, nameTable);