public class JadeRuntimeServices extends java.lang.Object implements RuntimeServicesInfraTier
Modifier and Type | Field and Description |
---|---|
private jade.wrapper.ContainerController |
cc |
private jade.core.Agent |
jadeAgent |
private static java.util.logging.Logger |
logger |
Constructor and Description |
---|
JadeRuntimeServices(jade.wrapper.ContainerController cc,
jade.core.Agent ag) |
Modifier and Type | Method and Description |
---|---|
AgArch |
clone(Agent source,
java.util.List<java.lang.String> archClasses,
java.lang.String agName)
Clones an agent
|
java.lang.String |
createAgent(java.lang.String agName,
java.lang.String agSource,
java.lang.String agClass,
java.util.List<java.lang.String> archClasses,
ClassParameters bbPars,
Settings stts,
Agent father)
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"), stts as
Settings (default value is new Settings()), and
father is the agent creating this agent (null is none).
|
java.util.Set<java.lang.String> |
getAgentsNames()
Returns a set of all agents' name
|
int |
getAgentsQty()
Gets the number of agents in the MAS.
|
boolean |
killAgent(java.lang.String agName,
java.lang.String byAg)
Kills the agent named agName as a requested by byAg.
|
void |
startAgent(java.lang.String agName)
start (e.g.
|
void |
stopMAS()
Stop all MAS (the agents, the environment, the controller, ...)
|
private static java.util.logging.Logger logger
private jade.wrapper.ContainerController cc
private jade.core.Agent jadeAgent
JadeRuntimeServices(jade.wrapper.ContainerController cc, jade.core.Agent ag)
public java.lang.String createAgent(java.lang.String agName, java.lang.String agSource, java.lang.String agClass, java.util.List<java.lang.String> archClasses, ClassParameters bbPars, Settings stts, Agent father) throws java.lang.Exception
RuntimeServicesInfraTier
Example: createAgent("bob", "bob.asl", "mypkg.MyAgent", null, null, null); Returns the name of the agent
createAgent
in interface RuntimeServicesInfraTier
java.lang.Exception
public void startAgent(java.lang.String agName)
RuntimeServicesInfraTier
startAgent
in interface RuntimeServicesInfraTier
public AgArch clone(Agent source, java.util.List<java.lang.String> archClasses, java.lang.String agName) throws JasonException
RuntimeServicesInfraTier
clone
in interface RuntimeServicesInfraTier
JasonException
public java.util.Set<java.lang.String> getAgentsNames()
RuntimeServicesInfraTier
getAgentsNames
in interface RuntimeServicesInfraTier
public int getAgentsQty()
RuntimeServicesInfraTier
getAgentsQty
in interface RuntimeServicesInfraTier
public boolean killAgent(java.lang.String agName, java.lang.String byAg)
RuntimeServicesInfraTier
killAgent
in interface RuntimeServicesInfraTier
public void stopMAS() throws java.lang.Exception
RuntimeServicesInfraTier
stopMAS
in interface RuntimeServicesInfraTier
java.lang.Exception