annotate src/main/java/christie/remoteTextEditor/StartRemotingTextEditor.java @ 234:665d56665b7e

add renew
author ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
date Tue, 21 Jan 2020 19:05:04 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
234
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 package christie.remoteTextEditor;
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 import christie.codegear.CodeGearManager;
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 import christie.codegear.StartCodeGear;
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 import christie.topology.manager.StartTopologyManager;
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 import christie.topology.manager.TopologyManagerConfig;
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 public class StartRemotingTextEditor extends StartCodeGear {
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 public StartRemotingTextEditor(CodeGearManager cgm) {
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 super(cgm);
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 }
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 public static void main(String[] args){
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 int TopologyManagerPort = 10000;
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 int TopologyNodePort = 10001;
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 String[] managerArg = {"--localPort", String.valueOf(TopologyManagerPort), "--confFile", "scripts/Log/star.dot"};
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(managerArg);
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 new StartTopologyManager(topologyManagerConfig);
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 for (int i = 0; i <= 1; i++){
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 String[] nodeArg = {"--managerPort", String.valueOf(TopologyManagerPort),
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 "--managerHost", "localhost",
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 "--localPort", String.valueOf(TopologyNodePort + i),
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 };
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 RemoteNodeStart.main(nodeArg);
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 }
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 }
665d56665b7e add renew
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 }