jadex.micro.tutorial.RegistryServiceE3 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.tutorial;
import java.util.HashMap;
import java.util.Map;
import jadex.bridge.IComponentIdentifier;
import jadex.bridge.service.annotation.Service;
import jadex.commons.future.Future;
import jadex.commons.future.IFuture;
/**
* Service for registering a nickname with component identifier.
*/
@Service
public class RegistryServiceE3 implements IRegistryServiceE3
{
//-------- attributes --------
/** The entries map. */
protected Map entries = new HashMap();
//-------- methods --------
/**
* Register a chatter.
*/
public void register(IComponentIdentifier cid, String nickname)
{
entries.put(nickname, cid);
}
/**
* Get the registered chatters.
*/
public IFuture