/** * Called when the plan is aborted. */ public void aborted() { if(tv!=null) { try { tv.terminate(); } catch(Exception e) { // Wait until service is finished before superordinated goal is dropped. tv.get(); } } } }
/** * Called when the plan is aborted. */ @PlanAborted public void aborted() { if(tv!=null) { try { tv.terminate(); } catch(Exception e) { // Wait until service is finished before superordinated goal is dropped. tv.get(); } } }
/** * The body method is called on the * instantiated plan instance from the scheduler. */ @PlanBody public void body(SendRescueForce goal) { ISpaceObject disaster = goal.getDisaster(); IExtinguishFireService force = (IExtinguishFireService)goal.getRescueForce(); ef = force.extinguishFire(disaster.getId()); ef.get(); }
/** * The body method is called on the * instantiated plan instance from the scheduler. */ @PlanBody public void body(SendRescueForce goal) { ISpaceObject disaster = goal.getDisaster(); IClearChemicalsService force = (IClearChemicalsService)goal.getRescueForce(); cc = force.clearChemicals(disaster.getId()); cc.get(); }
/** * The body method is called on the * instantiated plan instance from the scheduler. */ @PlanBody public void body(SendRescueForce goal) { ISpaceObject disaster = (ISpaceObject)goal.getDisaster(); // System.out.println("treat victims for: "+disaster); ITreatVictimsService force = (ITreatVictimsService)goal.getRescueForce(); tv = force.treatVictims(disaster.getId()); tv.get(); // System.out.println("treat victims end for: "+disaster); }
/** * The body method is called on the * instantiated plan instance from the scheduler. */ public void body() { ISpaceObject disaster = (ISpaceObject)getParameter("disaster").getValue(); ITreatVictimsService force = (ITreatVictimsService)getParameter("rescueforce").getValue(); tv = force.treatVictims(disaster.getId()); tv.get(Timeout.NONE); // hack??? treating victims may take longer than default timeout }
/** * The body method is called on the * instantiated plan instance from the scheduler. */ public void body() { ISpaceObject disaster = (ISpaceObject)getParameter("disaster").getValue(); IClearChemicalsService force = (IClearChemicalsService)getParameter("rescueforce").getValue(); cc = force.clearChemicals(disaster.getId()); cc.get(Timeout.NONE); // hack??? clearing chemicals may take longer than default timeout }
/** * The body method is called on the * instantiated plan instance from the scheduler. */ public void body() { ISpaceObject disaster = (ISpaceObject)getParameter("disaster").getValue(); IExtinguishFireService force = (IExtinguishFireService)getParameter("rescueforce").getValue(); // System.out.println("Calling forces to handle fire: " + disaster); ef = force.extinguishFire(disaster.getId()); ef.get(Timeout.NONE); // hack??? extinguishing fire may take longer than default timeout }