Mercurial > hg > Applications > AliceVNC
changeset 38:08a14d094d02
add debug option
author | sugi |
---|---|
date | Mon, 08 Dec 2014 16:00:27 +0900 |
parents | 5e20f680d6d0 |
children | dcc90f91f804 |
files | build.gradle src/main/java/jp/ac/u_ryukyu/alicevnc/AliceVNCConfig.java src/main/java/jp/ac/u_ryukyu/alicevnc/StartAliceVNC.java |
diffstat | 3 files changed, 16 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/build.gradle Sun Dec 07 18:31:36 2014 +0900 +++ b/build.gradle Mon Dec 08 16:00:27 2014 +0900 @@ -8,7 +8,7 @@ repositories { maven(){ - url 'http://www.cr.ie.u-ryukyu.ac.jp/hg/maven/raw-file/8991fa20f32f/' + url 'http://www.cr.ie.u-ryukyu.ac.jp/hg/maven/raw-file/ba8551c1a5c2/' } }
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/AliceVNCConfig.java Sun Dec 07 18:31:36 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/AliceVNCConfig.java Mon Dec 08 16:00:27 2014 +0900 @@ -3,14 +3,16 @@ import alice.topology.node.TopologyNodeConfig; public class AliceVNCConfig extends TopologyNodeConfig { - private boolean change = true; + private boolean debug = false; public AliceVNCConfig(String[] args) { super(args); for (int i = 0; i< args.length; i++) { if ("-c".equals(args[i])) { change = false; + } else if ("--debug".equals(args[i])) { + debug = true; } } } @@ -18,4 +20,8 @@ public boolean getAllowChange(){ return change; } + + public boolean debugMode(){ + return debug; + } }
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/StartAliceVNC.java Sun Dec 07 18:31:36 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/StartAliceVNC.java Mon Dec 08 16:00:27 2014 +0900 @@ -8,13 +8,18 @@ public static void main(String args[]){ AliceVNCConfig conf = new AliceVNCConfig(args); AliceVNC cs = new AliceVNC(conf); - if (conf.getManagerHostName() !=null){ - new TopologyNode(conf, cs); - } else { + if (conf.debugMode()) { cs.ods.put("_CLIST", new ArrayList<String>()); cs.ods.put("host", "node0"); cs.execute(); + return; } + + if (conf.getManagerHostName() ==null){ + conf.setManagerHostName("firefly.cr.ie.u-ryukyu.ac.jp"); + } + + new TopologyNode(conf, cs); } }