public IFuture<Void> execute(IInternalAccess ia) { // if(rescom.equals(getResumeCommand())) { RPlan.executePlan(RPlan.this, ia, rescom); } // if(getException()!=null) // { // return new Future<Void>(getException()); // } // else // { // return IFuture.DONE; // } return IFuture.DONE; } }, false);//.addResultListener(new DelegationResultListener<Void>(ret, true));
public void resultAvailable(T result) { // if(rescom.equals(getResumeCommand())) { setDispatchedElement(result); RPlan.executePlan(RPlan.this, ia, rescom); } }
public void exceptionOccurred(Exception exception) { // if(rescom.equals(getResumeCommand())) { setException(exception); RPlan.executePlan(RPlan.this, ia, rescom); } } }));
public IFuture<Void> execute(IInternalAccess ia) { // if(rescom.equals(getResumeCommand())) { setException(new TimeoutException()); RPlan.executePlan(RPlan.this, ia, rescom); } return IFuture.DONE; } });
public IFuture<Void> execute(IEvent event, IRule<Void> rule, Object context, Object condresult) { RPlan rplan = RPlan.createRPlan(mplan, mplan, new ChangeEvent(event), getInternalAccess()); RPlan.executePlan(rplan, getInternalAccess(), null); return IFuture.DONE; } };
RPlan.executePlan(rplan, ia, null); ret.setResult(null); RPlan.executePlan(rplan, ia, null); ret.setResult(null);
/** * Dispatch a goal wait for its result. * @param plan The pojo plan or plan name. * @param args The plan arguments. * @return The plan result. */ public <T, E> IFuture<E> adoptPlan(T plan, Object... args) { final Future<E> ret = new Future<E>(); MPlan mplan = bdimodel.getCapability().getPlan(plan instanceof String? (String)plan: plan.getClass().getName()); if(mplan==null) throw new RuntimeException("Plan model not found for: "+plan); ICandidateInfo ci = plan instanceof String? new CandidateInfoMPlan(new MPlanInfo(mplan, null), null, component): new CandidateInfoPojoPlan(plan, null, component); final RPlan rplan = RPlan.createRPlan(mplan, ci, new ChangeEvent(null, null, args, null), getComponent(), null, null); rplan.addListener(new DelegationResultListener(ret)); RPlan.executePlan(rplan, getComponent()); return ret; }
RPlan.executePlan(rplan, getInterpreter().getInternalAccess(), null); return ret;
public void resultAvailable(Void result) { Object res = RGoal.getGoalResult(rgoal, ia.getClassLoader()); if(mgoal.isMetagoal()) { // Execute selected plans if was metagoal // APL is automatically kept uptodate for(ICandidateInfo ci: (ICandidateInfo[])res) { RPlan.executePlan((RPlan)ci.getPlan(), ia); } } else { pae.planFinished(ia, rgoal); // Set goal result on parent goal if(pagoal!=null) pagoal.setGoalResult(res, ia.getClassLoader(), null, null, rgoal); } }
RPlan.executePlan(this, ia, new ICommand<Boolean>()
barrier.addFuture(RPlan.executePlan(rplan, component)); barrier.addFuture(RPlan.executePlan(rplan, component));
RPlan.executePlan(rplan, ia); RPlan.executePlan(rplan, ia); ret.setResult(null); RPlan.executePlan(rplan, ia);
RPlan.executePlan(rplan, getInternalAccess(), null);