view src/main/java/jp/ac/u_ryukyu/alicevnc/StopProxy.java @ 34:aace9df1462e

refactor
author sugi
date Thu, 13 Nov 2014 16:09:09 +0900
parents 0f964a1ec846
children 9354e8a1d03b
line wrap: on
line source

package jp.ac.u_ryukyu.alicevnc;

import com.glavsoft.viewer.Viewer;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;

public class StopProxy extends CodeSegment {

    private Receiver info = ids.create(CommandType.TAKE);

    public StopProxy() {
        info.setKey("viewer");
    }
    @Override
    public void run() {
        System.out.println("call clean up session");
        Viewer v = info.asClass(Viewer.class);
        v.closeApp();
        new ReceiveAliceVNCMessage();
    }

}