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