Mercurial > hg > Applications > AliceVNC
view src/main/java/jp/ac/u_ryukyu/alicevnc/CheckMyName.java @ 47:9354e8a1d03b
working AliceVNC
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 19 Oct 2015 23:48:18 +0900 |
parents | aace9df1462e |
children | 57ca704f86a3 |
line wrap: on
line source
package jp.ac.u_ryukyu.alicevnc; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class CheckMyName extends CodeSegment { private Receiver info = ids.create(CommandType.PEEK); public CheckMyName(CodeSegment cs){ this.aliceDaemon = cs.aliceDaemon; info.setKey("host", this); } @Override public void run() { if ("node0".equals(info.asString())) { new CreateWindow("local", this); new NegotiateVNCServer(this); } else { new CreateWindow("parent", this); } new ReceiveAliceVNCMessage(this); new SendChangeRequest(this); } }