jason.infra.saci
Class SaciRuntimeServices

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

public class SaciRuntimeServices
extends java.lang.Object
implements RuntimeServicesInfraTier


Constructor Summary
SaciRuntimeServices(java.lang.String name)
           
 
Method Summary
 AgArch clone(Agent source, java.lang.String archClassName, java.lang.String agName)
          Clones an agent
 boolean createAgent(java.lang.String agName, java.lang.String agSource, java.lang.String agClass, java.lang.String archClass, 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 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 setSocName(java.lang.String name)
           
 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
 

Constructor Detail

SaciRuntimeServices

public SaciRuntimeServices(java.lang.String name)
Method Detail

setSocName

public void setSocName(java.lang.String name)

createAgent

public boolean createAgent(java.lang.String agName,
                           java.lang.String agSource,
                           java.lang.String agClass,
                           java.lang.String archClass,
                           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);

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

clone

public AgArch clone(Agent source,
                    java.lang.String archClassName,
                    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 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