jadex.micro.testcases.serviceinheritance.ProviderAgent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-micro Show documentation
Show all versions of jadex-applications-micro Show documentation
The Jadex micro applications package contains several example applications, benchmarks and testcases using micro agents.
package jadex.micro.testcases.serviceinheritance;
import jadex.bridge.service.annotation.Service;
import jadex.commons.future.Future;
import jadex.commons.future.IFuture;
import jadex.micro.annotation.Agent;
import jadex.micro.annotation.Implementation;
import jadex.micro.annotation.ProvidedService;
import jadex.micro.annotation.ProvidedServices;
/**
* Agent
*/
@Agent
@Service
@ProvidedServices(@ProvidedService(type=IExtendedService.class, implementation=@Implementation(expression="$pojoagent")))
public class ProviderAgent implements IExtendedService
{
/**
* Example method returning some string value.
* @return Some basic info.
*/
public IFuture getBasicInfo()
{
// System.out.println("hello: "+ServiceCall.getCurrentInvocation().getTimeout());
return new Future("basic info");
}
/**
* Example method returning some string value.
* @return Some extended info.
*/
public IFuture getExtendedInfo()
{
return new Future("extended info");
}
}