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

jadex.micro.examples.mandelbrot.AppProviderService 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.bridge.service.types.appstore.AppMetaInfo;
import jadex.bridge.service.types.appstore.IAppProviderService;
import jadex.commons.future.Future;
import jadex.commons.future.IFuture;

/**
 * 
 */
@Service
public class AppProviderService implements IAppProviderService
{
	/** The app meta info. */
	protected AppMetaInfo ami;
	
	/** The component. */
	@ServiceComponent
	protected IInternalAccess agent;
	
	/**
	 * 
	 */
	public AppProviderService()
	{
		this.ami = new AppMetaInfo("Mandelbrot", "Jadex", "Allows to render fractal images", "1.0", 
			null, null);
	}
	
	/**
	 * 
	 */
	public IFuture getAppMetaInfo()
	{
		return new Future(ami);
	}

	/**
	 * 
	 */
	public IFuture getApplication()
	{
		IMandelbrotService ms = (IMandelbrotService)agent.getComponentFeature(IProvidedServicesFeature.class).getProvidedServices(IMandelbrotService.class)[0];
		return new Future(ms);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy