/** * Resume the execution of the plan. */ public void resume(Future<?> future) { // Only wake up if still waiting for same futur // (invalid resume might be called from outdated future after timeout already occurred or body aborted). if(this.future==future) { // if(toString().indexOf("ExtinguishFirePlan")!=-1) // System.out.println("resume "+this+", "+lis); lis.resultAvailable(null); } }
public void goalFinished(AgentEvent ae) { IGoal goal = (IGoal)ae.getSource(); if(goal.isSucceeded()) { goalcnt++; if(goalcnt==agoalnames.length) lis.resultAvailable(null); } else { lis.exceptionOccurred(goal.getException()); } }