jadex.bdi.planlib.cms.CMSRemoteDestroyComponentPlan 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.planlib.cms;
import jadex.base.fipa.CMSDestroyComponent;
import jadex.base.fipa.SFipa;
import jadex.bdi.runtime.IGoal;
import jadex.bdi.runtime.Plan;
import jadex.bridge.IComponentIdentifier;
/**
* Destroy an component on a remote cms.
*/
public class CMSRemoteDestroyComponentPlan extends Plan
{
/**
* The body method is called on the
* instatiated plan instance from the scheduler.
*/
public void body()
{
CMSDestroyComponent da = new CMSDestroyComponent();
da.setComponentIdentifier((IComponentIdentifier)getParameter("componentidentifier").getValue());
IGoal req = createGoal("rp_initiate");
req.getParameter("receiver").setValue(getParameter("cms").getValue());
req.getParameter("action").setValue(da);
req.getParameter("ontology").setValue(SFipa.COMPONENT_MANAGEMENT_ONTOLOGY_NAME);
dispatchSubgoalAndWait(req);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy