Mercurial > hg > Applications > TreeVNC
annotate src/main/java/jp/ac/u_ryukyu/treevnc/RequestScreenThread.java @ 331:42fcc9419498
add error message, add lostParent case by fail to connectTo.
author | oc |
---|---|
date | Tue, 03 Feb 2015 12:31:48 +0900 |
parents | b31903e5b02d |
children |
rev | line source |
---|---|
206 | 1 package jp.ac.u_ryukyu.treevnc; |
33
9d3478d11d3b
Add the processing of client
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
2 |
331
42fcc9419498
add error message, add lostParent case by fail to connectTo.
oc
parents:
207
diff
changeset
|
3 import com.glavsoft.exceptions.TransportException; |
16 | 4 import com.glavsoft.rfb.protocol.Protocol; |
5 | |
11 | 6 public class RequestScreenThread implements Runnable { |
207 | 7 public TreeRFBProto rfb; |
16 | 8 Protocol protocol; |
11 | 9 |
207 | 10 public RequestScreenThread(TreeRFBProto _rfb) { |
11 | 11 rfb = _rfb; |
12 } | |
13 | |
88 | 14 |
15 | |
16 /* (non-Javadoc) | |
17 * @see java.lang.Runnable#run() | |
18 * | |
19 * request full screen update every 3 second. | |
20 * restart send this immediately. | |
21 * nobody call this. | |
22 * | |
23 */ | |
11 | 24 public void run() { |
25 while (true) { | |
26 try { | |
88 | 27 synchronized(this) { |
28 wait(); | |
29 } | |
11 | 30 Thread.sleep(3000); |
331
42fcc9419498
add error message, add lostParent case by fail to connectTo.
oc
parents:
207
diff
changeset
|
31 rfb.writeFramebufferUpdateRequest(0, 0, protocol.getFbWidth(), protocol.getFbHeight(), false); |
42fcc9419498
add error message, add lostParent case by fail to connectTo.
oc
parents:
207
diff
changeset
|
32 } catch (InterruptedException e) { |
11 | 33 e.printStackTrace(); |
331
42fcc9419498
add error message, add lostParent case by fail to connectTo.
oc
parents:
207
diff
changeset
|
34 System.out.println("any thread has interrupted the current thread"); |
11 | 35 break; |
331
42fcc9419498
add error message, add lostParent case by fail to connectTo.
oc
parents:
207
diff
changeset
|
36 } |
42fcc9419498
add error message, add lostParent case by fail to connectTo.
oc
parents:
207
diff
changeset
|
37 } |
11 | 38 } |
39 | |
40 | |
88 | 41 /** |
42 * do nothing. | |
43 */ | |
11 | 44 public synchronized void reStart() { |
45 notify(); | |
46 } | |
47 | |
48 } |