Mercurial > hg > Members > riono > TreeVNC_ja_comment
annotate src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java @ 186:f76ee760c2d2
dead lock on command line root
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 24 Jun 2014 00:48:26 +0900 |
parents | c1b91dd27a13 |
children |
rev | line source |
---|---|
12 | 1 package jp.ac.u_ryukyu.treevnc.server; |
11 | 2 |
3 import java.awt.event.*; | |
4 import java.util.logging.Logger; | |
5 | |
59 | 6 import com.glavsoft.core.SettingsChangedEvent; |
11 | 7 import com.glavsoft.rfb.IChangeSettingsListener; |
8 import com.glavsoft.rfb.IRfbSessionListener; | |
9 import com.glavsoft.rfb.protocol.ProtocolSettings; | |
10 import com.glavsoft.viewer.Viewer; | |
11 import com.glavsoft.viewer.cli.Parser; | |
12 import com.glavsoft.viewer.swing.ParametersHandler; | |
13 | |
45 | 14 public class VncProxyService extends Viewer implements Runnable, |
15 IRfbSessionListener, IChangeSettingsListener { | |
11 | 16 |
17 /** | |
18 * | |
19 */ | |
20 private static final long serialVersionUID = 1L; | |
21 | |
46 | 22 public static Logger logger = Logger.getLogger("com.glavsoft"); |
23 private boolean forceReconnection; | |
24 private String reconnectionReason; | |
47 | 25 static VncProxyService currentVps; |
82 | 26 |
11 | 27 public VncProxyService() { |
186
f76ee760c2d2
dead lock on command line root
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
179
diff
changeset
|
28 ProtocolSettings.getDefaultSettings(); |
11 | 29 uiSettings = super.uiSettings; |
30 } | |
45 | 31 |
47 | 32 public VncProxyService(VncProxyService vps, String hostName) { |
33 this(); | |
34 connectionParams.hostName = hostName; | |
60 | 35 myRfb = vps.myRfb; |
47 | 36 forceReconnection = vps.forceReconnection; |
37 reconnectionReason = vps.reconnectionReason; | |
38 } | |
39 | |
11 | 40 public static void main(String[] argv) { |
41 String[] mainArgs = argv; | |
42 System.out.println(mainArgs.length); | |
43 // input into arguments Decision | |
60 | 44 |
11 | 45 Parser parser = new Parser(); |
46 ParametersHandler.completeParserOptions(parser); | |
47 | |
48 parser.parse(argv); | |
49 if (parser.isSet(ParametersHandler.ARG_HELP)) { | |
50 printUsage(parser.optionsUsage()); | |
51 System.exit(0); | |
52 } | |
46 | 53 VncProxyService vps = new VncProxyService(); |
179 | 54 vps.initRoot(vps.myRfb, "localhost"); |
46 | 55 } |
56 | |
60 | 57 |
34 | 58 |
11 | 59 @Override |
60 public void destroy() { | |
61 | |
62 } | |
63 | |
64 @Override | |
65 public void windowClosing(WindowEvent e) { | |
66 if (e != null && e.getComponent() != null) { | |
67 e.getWindow().setVisible(false); | |
68 } | |
69 closeApp(); | |
70 } | |
45 | 71 |
38 | 72 protected void socketClose() { |
73 } | |
45 | 74 |
38 | 75 @Override |
76 public void rfbSessionStopped(final String reason) { | |
59 | 77 } |
78 | |
79 @Override | |
80 public void settingsChanged(SettingsChangedEvent event) { | |
69 | 81 } |
82 | |
11 | 83 } |