Package jason.infra.jade
Class JadeRuntimeServices
java.lang.Object
jason.infra.jade.JadeRuntimeServices
- All Implemented Interfaces:
RuntimeServices
,Remote
-
Method Summary
Modifier and TypeMethodDescriptioncreateAgent
(String agName, String agSource, String agClass, List<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"), archClasses as agent architecture classes, 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).void
dfDeRegister
(String agName, String service, String type) void
dfRegister
(String agName, String service, String type) void
dfSubscribe
(String agName, String service, String type) Returns a set of all agents' nameint
Gets the number of agents in the MAS.getNewAgentName
(String baseName) boolean
boolean
Kills the agent named agName as a requested by byAg.void
registerDefaultAgArch
(String agArch) register a class to be included as new agents archsvoid
startAgent
(String agName) starts an agent (e.g.void
stopMAS
(int deadline, boolean stopJVM, int exitValue) Stops 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
Methods inherited from interface jason.runtime.RuntimeServices
clone, getAgentSnapshot, getAgStatus, getDF, getMASName, getWP, loadASL, runAsAgent, stopMAS
-
Method Details
-
getNewAgentName
- Specified by:
getNewAgentName
in interfaceRuntimeServices
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceRuntimeServices
-
createAgent
public String createAgent(String agName, String agSource, String agClass, List<String> archClasses, ClassParameters bbPars, Settings stts, Agent father) throws Exception Description copied from interface:RuntimeServices
Creates a new agent with agName from source agSource, using agClass as agent class (default value is "jason.asSemantics.Agent"), archClasses as agent architecture classes, 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). if no archClasses is informed (null value), if fathers is informed use father's ag archs else use default ag archs (see registerDefaultAgArch)Example: createAgent("bob", "bob.asl", "mypkg.MyAgent", null, null, null); Returns the name of the agent
- Specified by:
createAgent
in interfaceRuntimeServices
- Throws:
Exception
-
startAgent
Description copied from interface:RuntimeServices
starts an agent (e.g. create thread for it)- Specified by:
startAgent
in interfaceRuntimeServices
-
getAgentsName
Description copied from interface:RuntimeServices
Returns a set of all agents' name- Specified by:
getAgentsName
in interfaceRuntimeServices
-
getAgentsQty
public int getAgentsQty()Description copied from interface:RuntimeServices
Gets the number of agents in the MAS.- Specified by:
getAgentsQty
in interfaceRuntimeServices
-
killAgent
Description copied from interface:RuntimeServices
Kills the agent named agName as a requested by byAg. Agent.stopAg() method is called before the agent is removed.- Specified by:
killAgent
in interfaceRuntimeServices
-
stopMAS
Description copied from interface:RuntimeServices
Stops all MAS (the agents, the environment, the controller, ...)- Specified by:
stopMAS
in interfaceRuntimeServices
- Throws:
Exception
-
dfRegister
- Specified by:
dfRegister
in interfaceRuntimeServices
-
dfDeRegister
- Specified by:
dfDeRegister
in interfaceRuntimeServices
-
dfSearch
- Specified by:
dfSearch
in interfaceRuntimeServices
-
dfSubscribe
- Specified by:
dfSubscribe
in interfaceRuntimeServices
-
registerDefaultAgArch
Description copied from interface:RuntimeServices
register a class to be included as new agents archs- Specified by:
registerDefaultAgArch
in interfaceRuntimeServices
-
getDefaultAgArchs
- Specified by:
getDefaultAgArchs
in interfaceRuntimeServices
-