1 24 25 package org.objectweb.dream.control.activity.scheduler; 26 27 import org.objectweb.dream.AbstractComponent; 28 import org.objectweb.dream.control.activity.task.Task; 29 import org.objectweb.fractal.api.NoSuchInterfaceException; 30 import org.objectweb.fractal.api.control.IllegalBindingException; 31 import org.objectweb.fractal.api.control.IllegalLifeCycleException; 32 33 38 public class ForwarderSchedulerImpl extends AbstractComponent 39 implements 40 Scheduler 41 { 42 43 44 protected Task task; 45 46 50 53 public Object schedule(Object hints) throws InterruptedException , 54 StoppedSchedulerException 55 { 56 return task.execute(hints); 57 } 58 59 63 67 public synchronized void bindFc(String clientItfName, Object serverItf) 68 throws NoSuchInterfaceException, IllegalBindingException, 69 IllegalLifeCycleException 70 { 71 super.bindFc(clientItfName, serverItf); 72 if (clientItfName.equals(Task.ITF_NAME)) 73 { 74 task = (Task) serverItf; 75 } 76 } 77 78 81 public String [] listFc() 82 { 83 return new String []{Task.ITF_NAME}; 84 } 85 86 } | Popular Tags |