jadex.bdi.cmsagent.CMSDestroyComponentPlan Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applib-bdi Show documentation
Show all versions of jadex-applib-bdi Show documentation
The Jadex applib BDI package contain
ready to use functionalities for
BDI agents mostly in form of modules
called capabilities.
package jadex.bdi.cmsagent;
import jadex.base.fipa.CMSDestroyComponent;
import jadex.base.fipa.Done;
import jadex.bdi.runtime.IGoal;
import jadex.bdi.runtime.Plan;
/**
* Destroy a component.
*/
public class CMSDestroyComponentPlan extends Plan
{
/**
* The body method is called on the
* instatiated plan instance from the scheduler.
*/
public void body()
{
CMSDestroyComponent da = (CMSDestroyComponent)getParameter("action").getValue();
IGoal dag = createGoal("cms_destroy_component");
dag.getParameter("componentidentifier").setValue(da.getComponentIdentifier());
dispatchSubgoalAndWait(dag);
getParameter("result").setValue(new Done(da));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy