view src/main/java/christie/test/Remote/RemotePutTest.java @ 25:76fac42a840e

work RemoteTakeTest
author Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
date Fri, 26 Jan 2018 18:03:36 +0900
parents 695705dba324
children bf8ac57409af
line wrap: on
line source

package christie.test.Remote;

import christie.annotation.Take;
import christie.codegear.CodeGear;
import christie.codegear.CodeGearManager;
import christie.datagear.DataGear;
import christie.test.TestLocal.TestCodeGear;

public class RemotePutTest extends CodeGear {

    @Take("hoge")
    public DataGear<Integer> hoge = new DataGear<>();

    @Take("cgmID")
    public DataGear<Integer> cgmID = new DataGear<>();

    @Override
    protected void run(CodeGearManager cgm) {
        if (hoge.getData() != 10){
            System.out.println(cgmID.getData() + " : " +hoge.getData());
            cgm.setup(new RemotePutTest());
            getDGM("remote").put("hoge", hoge.getData() + 1);
            getDGM("remote").put("cgmID", cgm.cgmID);
        }
    }

}