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

jadex.micro.testcases.tuplefuture.ProviderAgent Maven / Gradle / Ivy

Go to download

The Jadex micro applications package contains several example applications, benchmarks and testcases using micro agents.

There is a newer version: 4.0.267
Show newest version
package jadex.micro.testcases.tuplefuture;

import jadex.bridge.service.annotation.Service;
import jadex.commons.future.ITuple2Future;
import jadex.commons.future.Tuple2Future;
import jadex.micro.annotation.Agent;
import jadex.micro.annotation.ProvidedService;
import jadex.micro.annotation.ProvidedServices;

/**
 *  Agent implementing the test service.
 */
@Agent
@Service
@ProvidedServices({@ProvidedService(type=ITestService.class)})
public class ProviderAgent implements ITestService
{
	/**
	 *  Example implementation of the method.
	 */
	public ITuple2Future getSomeResults()
	{
//		Tuple2Future ret = new Tuple2Future("hello", Integer.valueOf(99));
		Tuple2Future ret = new Tuple2Future();
		ret.setSecondResult(Integer.valueOf(99));
		ret.setFirstResult("hello");
		System.out.println("called method getSomeResults()");
		return ret;
	}
	
//	/**
//	 *  Example implementation of the method.
//	 */
//	public ITuple2Future getSomeResults2()
//	{
//		return getSomeResults();
//	}
	
//	/**
//	 * 
//	 */
//	public IIntermediateFuture getSomeResults()
//	{
//		IntermediateFuture ret = new IntermediateFuture(Arrays.asList(new String[]{"a", "b"}));
//		System.out.println("called method getSomeResults()");
//		return ret;
//	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy