comparison src/main/java/jp/ac/u_ryukyu/treevnc/RequestScreenThread.java @ 206:2b3eb4a9492f

MyRfbProto reorganization
author oc
date Wed, 02 Jul 2014 17:58:55 +0900
parents src/main/java/jp/ac/u_ryukyu/treevnc/server/RequestScreenThread.java@8f4c45c1b396
children b31903e5b02d
comparison
equal deleted inserted replaced
205:614db20d8fab 206:2b3eb4a9492f
1 package jp.ac.u_ryukyu.treevnc;
2
3 import com.glavsoft.rfb.protocol.Protocol;
4
5 public class RequestScreenThread implements Runnable {
6 public MyRfbProto rfb;
7 Protocol protocol;
8
9 public RequestScreenThread(MyRfbProto _rfb) {
10 rfb = _rfb;
11 }
12
13
14
15 /* (non-Javadoc)
16 * @see java.lang.Runnable#run()
17 *
18 * request full screen update every 3 second.
19 * restart send this immediately.
20 * nobody call this.
21 *
22 */
23 public void run() {
24 while (true) {
25 try {
26 synchronized(this) {
27 wait();
28 }
29 Thread.sleep(3000);
30 rfb.writeFramebufferUpdateRequest(0, 0, protocol.getFbWidth(),
31 protocol.getFbHeight(), false);
32
33 } catch (Exception e) {
34 e.printStackTrace();
35 break;
36 }
37 }
38 }
39
40
41 /**
42 * do nothing.
43 */
44 public synchronized void reStart() {
45 notify();
46 }
47
48 }