view src/test/java/christie/example/HelloWorld/HelloWorldCodeGear.java @ 254:04bb299f18bd

tweak
author ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
date Fri, 24 Jan 2020 18:23:01 +0900
parents 371c8492753e
children
line wrap: on
line source

package christie.example.HelloWorld;

import christie.annotation.Peek;
import christie.annotation.Take;
import christie.codegear.CodeGear;
import christie.codegear.CodeGearManager;
import christie.topology.Message;

public class HelloWorldCodeGear extends CodeGear {

    @Take
    String helloWorld;

    @Override
    protected void run(CodeGearManager cgm) {
        System.out.print(helloWorld + " ");
        cgm.setup(new HelloWorldCodeGear());
        if(helloWorld == "world"){
            System.out.println("catch");
            cgm.getLocalDGM().put("finishMessage", new Message());
        }
    }
}