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

jadex.web.examples.hellobdiv3.SayHelloBDI Maven / Gradle / Ivy

There is a newer version: 4.0.267
Show newest version
package jadex.web.examples.hellobdiv3;

import jadex.bdiv3.IBDIAgent;
import jadex.bridge.service.annotation.Service;
import jadex.commons.future.Future;
import jadex.commons.future.IFuture;
import jadex.micro.annotation.Agent;

/**
 *  Say hello agent.
 */
@Agent(autoprovide=true)
@Service
public abstract class SayHelloBDI implements ISayHelloService, IBDIAgent
{
	/**
	 *  Say hello method.
	 *  @return Say hello text.
	 */
	public IFuture sayHello()
	{
		String text = Math.random()>0.5? "Hello User, I am ": "Hallo Nutzer, ich bin ";
		text += getComponentIdentifier();
		return new Future(text);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy