All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.bdi.cmsagent.CMSSuspendComponentPlan Maven / Gradle / Ivy

Go to download

The Jadex applib BDI package contain ready to use functionalities for BDI agents mostly in form of modules called capabilities.

There is a newer version: 2.4
Show newest version
package jadex.bdi.cmsagent;

import jadex.base.fipa.CMSSuspendComponent;
import jadex.base.fipa.Done;
import jadex.bdi.runtime.IGoal;
import jadex.bdi.runtime.Plan;

/**
 *  Suspend a component.
 */
public class CMSSuspendComponentPlan extends Plan
{
	/**
	 * The body method is called on the
	 * instatiated plan instance from the scheduler.
	 */
	public void body()
	{
		CMSSuspendComponent sa = (CMSSuspendComponent)getParameter("action").getValue();

		IGoal sag = createGoal("cms_suspend_component");
		sag.getParameter("componentidentifier").setValue(sa.getComponentIdentifier());
		dispatchSubgoalAndWait(sag);

		getParameter("result").setValue(new Done(sa));
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy