annotate src/main/java/christie/remotingTextEditor/StartManToManSession.java @ 229:87f7afd6cbd9

tweak from one
author one@firefly.cr.ie.u-ryukyu.ac.jp
date Fri, 27 Dec 2019 18:39:19 +0900
parents 0c74d9168aff
children c8c8c447b2b3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
224
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 package christie.remotingTextEditor;
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 import christie.codegear.CodeGearManager;
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 import christie.codegear.StartCodeGear;
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 import christie.topology.manager.StartTopologyManager;
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 import christie.topology.manager.TopologyManagerConfig;
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 public class StartManToManSession extends StartCodeGear {
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 public StartManToManSession(CodeGearManager cgm) {
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 super(cgm);
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 }
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 public static void main(String[] args){
229
87f7afd6cbd9 tweak from one
one@firefly.cr.ie.u-ryukyu.ac.jp
parents: 224
diff changeset
15 //ポート番号10000~1000xはone上では他のライブラリに使われている。(Net.javaにつかわれている?)
87f7afd6cbd9 tweak from one
one@firefly.cr.ie.u-ryukyu.ac.jp
parents: 224
diff changeset
16 int TopologyManagerPort = 10100;
87f7afd6cbd9 tweak from one
one@firefly.cr.ie.u-ryukyu.ac.jp
parents: 224
diff changeset
17 int TopologyNodePort = 10101;
224
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 String[] managerArg = {"--localPort", String.valueOf(TopologyManagerPort), "--confFile", "scripts/Log/manToMan.dot"};
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(managerArg);
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 new StartTopologyManager(topologyManagerConfig);
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 for (int i = 0; i <= 1; i++){
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 String[] nodeArg = {"--managerPort", String.valueOf(TopologyManagerPort),
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 "--managerHost", "localhost",
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 "--localPort", String.valueOf(TopologyNodePort + i),
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 };
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 NodeStart.main(nodeArg);
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 }
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 }
0c74d9168aff fix Editor & trans
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 }