samer@0: package samer.silk; samer@0: samer@0: import samer.tools.*; samer@0: import java.util.*; samer@0: import jsint.*; samer@0: samer@0: public class SilkTask implements Task, Observer { samer@0: Procedure _start, _stop, _run, _dispose; samer@0: private final static Object[] args=new Object[0]; samer@0: samer@0: public SilkTask(Procedure _run) { this._run=_run; /* check minargs=0 */ } samer@0: public String toString() { return "Scheme:"+_run; } samer@0: samer@0: public void starting() {} samer@0: public void stopping() {} samer@0: public void dispose() {} samer@0: public void run() { _run.apply(args); } samer@0: samer@0: public void update(Observable o, Object a) { _run.apply(args); } samer@0: }