1 24 25 package org.objectweb.dream.control.activity.task; 26 27 import java.util.Map ; 28 29 import org.objectweb.dream.util.Error; 30 import org.objectweb.fractal.api.control.LifeCycleController; 31 32 38 public abstract class LifeCycleActivationTaskMixin 39 { 40 41 45 48 public void addTask(Task task, Map hints) throws IllegalTaskException 49 { 50 _super_addTask(task, hints); 51 if (_this_weaveableOptLC == null 52 || _this_weaveableOptLC.getFcState() 53 .equals(LifeCycleController.STARTED)) 54 { 55 try 56 { 57 _this_weaveableTAC.activateTask(task); 58 } 59 catch (NoSuchTaskException e) 60 { 61 Error.bug(null, e); 63 } 64 } 65 } 66 67 70 public void removeTask(Task task) throws NoSuchTaskException, 71 IllegalTaskException 72 { 73 _this_weaveableTAC.deactivateTask(task); 74 _super_removeTask(task); 75 } 76 77 81 86 public TaskActivationController _this_weaveableTAC; 87 88 93 public LifeCycleController _this_weaveableOptLC; 94 95 101 public abstract void _super_addTask(Task task, Map hints) 102 throws IllegalTaskException; 103 104 110 public abstract void _super_removeTask(Task task) throws NoSuchTaskException, 111 IllegalTaskException; 112 } | Popular Tags |