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

jadex.micro.testcases.lazyinject.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.lazyinject;

import jadex.bridge.service.annotation.Service;
import jadex.commons.future.IIntermediateFuture;
import jadex.commons.future.ITuple2Future;
import jadex.commons.future.IntermediateFuture;
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 getFirstTupleResult()
	{
		Tuple2Future ret = new Tuple2Future();
		ret.setFirstResult("hello");
		System.out.println("called method getFirstTupleResult()");
		return ret;
	}

	/**
	 *  Example implementation of the method.
	 */
	public IIntermediateFuture getIntermediateResults() {
		IntermediateFuture ret = new IntermediateFuture();
		ret.addIntermediateResult("hello");
		System.out.println("called method getIntermediateResults()");
		return ret;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy