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

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

import jadex.bridge.ServiceCall;
import jadex.bridge.component.IArgumentsResultsFeature;
import jadex.commons.future.Future;
import jadex.commons.future.IFuture;
import jadex.micro.annotation.Agent;
import jadex.micro.annotation.AgentBody;
import jadex.micro.annotation.AgentCreated;
import jadex.micro.annotation.AgentFeature;


/**
 * 
 */
@Agent
public class ProviderAgent
{
	@AgentFeature
	private IArgumentsResultsFeature argResults;

	@AgentCreated
	private void created() {
		System.out.println("provider created");
	}

	@AgentBody
	private void body() {
		argResults.getResults().put("exampleresult", "value");
	}
	/**
	 *  Call a method that must use a secure
	 *  transport under the hood.
	 */
	public IFuture method(String msg)
	{
		ServiceCall sc = ServiceCall.getCurrentInvocation();
		Future ret = new Future();
		return ret;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy