
jadex.bdi.testcases.semiautomatic.ShutdownTesterPlan Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-bdi Show documentation
Show all versions of jadex-applications-bdi Show documentation
The Jadex BDI applications package contain
several example applications, benchmarks and
testcases using BDI agents.
The newest version!
package jadex.bdi.testcases.semiautomatic;
import jadex.bdi.runtime.GoalFailureException;
import jadex.bdi.runtime.IGoal;
import jadex.bdi.runtime.Plan;
import jadex.bridge.IComponentIdentifier;
/**
* Test the shutdown of a platform
*/
public class ShutdownTesterPlan extends Plan
{
/**
* The plan body.
*/
public void body()
{
IComponentIdentifier ams = (IComponentIdentifier)getBeliefbase().getBelief("cms").getFact();
IGoal sd = createGoal("cms_shutdown_platform");
sd.getParameter("cms").setValue(ams);
try
{
dispatchSubgoalAndWait(sd);
System.out.println("Remote platform successfully shutdowned.");
}
catch(GoalFailureException e)
{
e.printStackTrace();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy