jason.infra.jade
Class JadeRuntimeServices

Package class diagram package JadeRuntimeServices
java.lang.Object
  extended by jason.infra.jade.JadeRuntimeServices
All Implemented Interfaces:
RuntimeServicesInfraTier

public class JadeRuntimeServices
extends java.lang.Object
implements RuntimeServicesInfraTier


Method Summary
 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)
          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()).
 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)
          Kills the agent named agName.
 void startAgent(java.lang.String agName)
          start (e.g.
 void stopMAS()
          Stop all MAS (the agents, the environment, the controller, ...)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createAgent

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)
                             throws java.lang.Exception
Description copied from 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

Specified by:
createAgent in interface RuntimeServicesInfraTier
Throws:
java.lang.Exception

startAgent

public void startAgent(java.lang.String agName)
Description copied from interface: RuntimeServicesInfraTier
start (e.g. create thread) the agent

Specified by:
startAgent in interface RuntimeServicesInfraTier

clone

public AgArch clone(Agent source,
                    java.util.List<java.lang.String> archClasses,
                    java.lang.String agName)
             throws JasonException
Description copied from interface: RuntimeServicesInfraTier
Clones an agent

Specified by:
clone in interface RuntimeServicesInfraTier
Returns:
the agent arch created
Throws:
JasonException

getAgentsNames

public java.util.Set<java.lang.String> getAgentsNames()
Description copied from interface: RuntimeServicesInfraTier
Returns a set of all agents' name

Specified by:
getAgentsNames in interface RuntimeServicesInfraTier

getAgentsQty

public int getAgentsQty()
Description copied from interface: RuntimeServicesInfraTier
Gets the number of agents in the MAS.

Specified by:
getAgentsQty in interface RuntimeServicesInfraTier

killAgent

public boolean killAgent(java.lang.String agName)
Description copied from interface: RuntimeServicesInfraTier
Kills the agent named agName. The stopAg() method, in the agent architecture is called before the agent is removed.

Specified by:
killAgent in interface RuntimeServicesInfraTier

stopMAS

public void stopMAS()
             throws java.lang.Exception
Description copied from interface: RuntimeServicesInfraTier
Stop all MAS (the agents, the environment, the controller, ...)

Specified by:
stopMAS in interface RuntimeServicesInfraTier
Throws:
java.lang.Exception