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

jadex.micro.examples.mandelbrot.MandelbrotService 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.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);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy