jadex.micro.examples.mandelbrot.MandelbrotService 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.examples.mandelbrot;
import jadex.bridge.IInternalAccess;
import jadex.bridge.service.annotation.Service;
import jadex.bridge.service.annotation.ServiceComponent;
import jadex.bridge.service.component.IProvidedServicesFeature;
import jadex.commons.future.Future;
import jadex.commons.future.IFuture;
/**
*
*/
@Service
public class MandelbrotService implements IMandelbrotService
{
/** The agent. */
@ServiceComponent
protected IInternalAccess agent;
/**
* Get the generate service.
* @return The generate service.
*/
public IFuture getGenerateService()
{
IGenerateService ser = (IGenerateService)agent.getComponentFeature(IProvidedServicesFeature.class).getProvidedServices(IGenerateService.class)[0];
return new Future(ser);
}
/**
* Get the display service.
* @return The display service.
*/
public IFuture getDisplayService()
{
IDisplayService ser = (IDisplayService)agent.getComponentFeature(IProvidedServicesFeature.class).getProvidedServices(IDisplayService.class)[0];
return new Future(ser);
}
}