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

jadex.bdi.testcases.WorkPlan Maven / Gradle / Ivy

Go to download

The Jadex BDI applications package contain several example applications, benchmarks and testcases using BDI agents.

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

import jadex.bdi.runtime.Plan;

/**
 *  This plan does some work and prints out sth.
 */
public class WorkPlan extends Plan
{
	//-------- constructors --------

	/**
	 *  Create a new work plan.
	 */
	public WorkPlan()
	{
		getLogger().info("Created: "+this);
	}

	//-------- methods --------

	/**
	 *  The plan body.
	 */
	public void body()
	{
		while(true)
		{
			getLogger().info("Working: "+this);
			waitFor(1000);
		}
	}
	
	/**
	 *  The plan was aborted.
	 */
	public void aborted()
	{
		getLogger().info("Aborted: "+this);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy