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

jadex.micro.testcases.syncservices.ProviderAgent 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.syncservices;

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

import javax.swing.undo.CannotUndoException;

import jadex.bridge.service.ServiceInvalidException;
import jadex.bridge.service.annotation.Service;
import jadex.micro.annotation.Agent;

/**
 * 
 */
@Agent(autoprovide=true)
@Service
public class ProviderAgent implements ISynchronousExampleService
{
	/**
	 *  Void method.
	 */
	public void doVoid()
	{
		System.out.println("do void");
		throw new ServiceInvalidException("doVoid()");
	}
	
	/**
	 *  Int method.
	 */
	public int getInt()
	{
		return 3;
	}
	
	/**
	 *  Collection method.
	 */
	public Collection getCollection()
	{
		List ret = new ArrayList();
		ret.add("abc");
		ret.add("def");
		return ret;
	}
	
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy