view src/treeVnc/RequestScreenThread.java @ 6:01cdbc95142f default tip

update build.xml
author Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
date Mon, 30 Apr 2012 16:04:44 +0900
parents 756bfaf731f3
children
line wrap: on
line source

package treeVnc;

import java.io.IOException;

public class RequestScreenThread implements Runnable {
	MyRfbProtoProxy rfb;

	RequestScreenThread(MyRfbProtoProxy _rfb) {
		rfb = _rfb;
	}

	public void run() {
		while (true) {
			try {
				waitThread();
				Thread.sleep(3000);
				rfb.writeFramebufferUpdateRequest(0, 0, rfb.framebufferWidth,
						rfb.framebufferHeight, false);

			} catch (Exception e) {
				e.printStackTrace();
				break;
			}
		}
	}
	
    public synchronized void waitThread() {
    	try{
    		wait();
        }catch(InterruptedException e) {
        	e.printStackTrace();
    	}
    }

    public synchronized void reStart() {
    	notify();
    }
    
    public void checkDelay() throws IOException {
    	rfb.checkDelayData();
    }
    
}