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

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

import java.util.Collection;
import java.util.List;

import jadex.bridge.service.annotation.MultiplexCollector;
import jadex.bridge.service.annotation.MultiplexDistributor;
import jadex.bridge.service.annotation.TargetMethod;
import jadex.bridge.service.component.multiinvoke.SequentialMultiplexDistributor;
import jadex.commons.future.IFuture;
import jadex.commons.future.IIntermediateFuture;

/**
 *  Multiplex Interface for IExampleService.
 */
public interface IMultiplexExampleService
{
	// indirect intermediate future version
	
	/**
	 *  Get an item.
	 *  @return The items of all example services.
	 */
	@TargetMethod("getItem")
	public IIntermediateFuture> getItem1();
	
	/**
	 *  Get the items.
	 *  @return The items of all example services.
	 */
	@TargetMethod("getItems")
	public IIntermediateFuture> getItems1(int num);
	
	// indirect future version
	
	/**
	 *  Get an item.
	 *  @return The items of all example services.
	 */
	@TargetMethod("getItem")
	public IFuture>> getItem2();
	
	/**
	 *  Get the items.
	 *  @return The items of all example services.
	 */
	@TargetMethod("getItems")
	public IFuture>> getItems2(int num);
	
	// flattened intermediate future version
		
	/**
	 *  Get an item.
	 *  @return The items of all example services.
	 */
	@TargetMethod("getItem")
	public IIntermediateFuture getItem3();
	
	/**
	 *  Get the items.
	 *  @return The items of all example services.
	 */
	@TargetMethod("getItems")
	public IIntermediateFuture getItems3(int num);
	
	// flattened future version
	
	/**
	 *  Get an item.
	 *  @return The items of all example services.
	 */
	@TargetMethod("getItem")
	public IFuture> getItem4();
	
	/**
	 *  Get the items.
	 *  @return The items of all example services.
	 */
	@TargetMethod("getItems")
	public IFuture> getItems4(int num);
	
	
	// automated task distribution
	
	/**
	 *  Perform a list of additions.
	 */
	@MultiplexDistributor(SequentialMultiplexDistributor.class)
	@TargetMethod(value="add", parameters={int.class, int.class})
	public IIntermediateFuture add(List vals);
	
	/**
	 *  Perform a list of additions and summing up.
	 */
	@MultiplexDistributor(SequentialMultiplexDistributor.class)
	@MultiplexCollector(SumMultiplexCollector.class)
	@TargetMethod(value="add", parameters={int.class, int.class})
	public IFuture sum(List vals);

	// todo?
//	public IFuture> add(List a, List b);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy