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

jadex.bdi.benchmarks.RequestReceiverPlan 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.benchmarks;

import jadex.bdi.runtime.Plan;

/**
 *	Handle requests and generate reply value.
 */
public class RequestReceiverPlan extends Plan
{
	public void body()
	{
		// Simple challenge response scheme allowing the initiator to check,
		// if the right request was answered.
	    Integer challenge	= (Integer) getParameter("action").getValue();
	    int	response	= challenge.intValue() + 1;
	    getParameter("result").setValue(new Integer(response));
	}	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy