41
|
1 package christie.topology.manager;
|
|
2
|
|
3 public class TopologyManagerConfig {
|
|
4 public boolean showTime = false;
|
|
5 public String confFilePath;
|
|
6 public TopologyType type = TopologyType.Tree;
|
|
7 public int hasChild = 2;
|
|
8
|
|
9 public TopologyManagerConfig(String[] args) {
|
|
10
|
|
11 for (int i = 0; i < args.length; i++) {
|
|
12 if ("-conf".equals(args[i])) {
|
|
13 confFilePath = args[++i];
|
|
14 } else if ("--Topology".equals(args[i])) {
|
|
15 String typeName = args[++i];
|
|
16 if ("tree".equals(typeName)) {
|
|
17 type = TopologyType.Tree;
|
|
18 }
|
|
19 } else if ("--Child".equals(args[i])) {
|
|
20 hasChild = Integer.parseInt(args[++i]);
|
|
21 } else if ("--showTime".equals(args[i])) {
|
|
22 showTime = true;
|
|
23 }
|
|
24 }
|
|
25
|
|
26 }
|
|
27 }
|