
jason.runtime.RuntimeServicesInfraTier Maven / Gradle / Ivy
Show all versions of jason Show documentation
package jason.runtime;
import jason.JasonException;
import jason.architecture.AgArch;
import jason.asSemantics.Agent;
import jason.mas2j.ClassParameters;
import java.util.List;
import java.util.Set;
/**
* This interface is implemented by the infrastructure tier
* (Saci/Centralised/...) to provide concrete runtime services.
*/
public interface RuntimeServicesInfraTier {
/**
* Creates a new agent with agName from source
* agSource, using agClass as agent class (default
* value is jason.asSemantics.Agent), archClass as agent
* architecture class (default value is
* jason.architecture.AgArch), bbPars as the belief base
* class (default value is DefaultBeliefBase), and stts as
* Settings (default value is new Settings()).
*
* Example: createAgent("bob", "bob.asl", "mypkg.MyAgent", null, null, null);
*
* Returns the name of the agent
*/
public String createAgent(String agName, String agSource, String agClass, List archClasses, ClassParameters bbPars, Settings stts) throws Exception;
/** start (e.g. create thread) the agent */
public void startAgent(String agName);
/**
* Clones an agent
*
* @param source: the used as source of beliefs, plans, ...
* @param archClassName: the architecture that will be used
* @param agName: the name of the clone
* @return the agent arch created
* @throws JasonException
*/
public AgArch clone(Agent source, List archClasses, String agName) throws JasonException;
/**
* Kills the agent named agName as a requested by byAg.
* The stopAg() method, in
* the agent architecture is called before the agent is removed.
*/
public boolean killAgent(String agName, String byAg);
/** Returns a set of all agents' name */
public Set getAgentsNames();
/** Gets the number of agents in the MAS. */
public int getAgentsQty();
/** Stop all MAS (the agents, the environment, the controller, ...) */
public void stopMAS() throws Exception;
}