1 24 25 package helloworld; 26 27 import java.util.Collections ; 28 29 import org.objectweb.dream.control.activity.Util; 30 import org.objectweb.fractal.api.Component; 31 import org.objectweb.fractal.api.control.IllegalLifeCycleException; 32 import org.objectweb.util.monolog.api.BasicLevel; 33 34 37 public class ClientImpl extends AbstractClientImpl 38 { 39 40 44 47 protected void beforeFirstStart(Component componentItf) 48 throws IllegalLifeCycleException 49 { 50 try 51 { 52 Util.addTask(componentItf, new ClientTask("Hello World task1"), 53 Collections.EMPTY_MAP); 54 Util.addTask(componentItf, new ClientTask("Hello World task2"), 55 Collections.EMPTY_MAP); 56 logger.log(BasicLevel.DEBUG, "tasks added"); 57 } 58 catch (Exception e) 59 { 60 throw new IllegalLifeCycleException("Can't add task"); 61 } 62 } 63 } | Popular Tags |