Package jason.runtime
Class DelegatedRuntimeServices
java.lang.Object
jason.runtime.DelegatedRuntimeServices
- All Implemented Interfaces:
RuntimeServices,Remote
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClones an agent and starts itcreateAgent(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).voiddfDeRegister(String agName, String service, String type) voiddfRegister(String agName, String service, String type) voiddfSubscribe(String agName, String service, String type) Returns a set of all agents' namegetAgentSnapshot(String agName) gets a copy of some agent (BB, PL, ...)intGets the number of agents in the MAS.getDF()getNewAgentName(String baseName) getWP()booleanbooleanKills the agent named agName as a requested by byAg.loads some ASL code into some agent, if replace is true, the previous plans from the sourceID will be removedvoidregisterDefaultAgArch(String agArch) register a class to be included as new agents archsrunAsAgent(String agName, String code) agent agName executes the code (in a new intention)voidstartAgent(String agName) starts an agent (e.g.voidstopMAS(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, waitMethods inherited from interface jason.runtime.RuntimeServices
getAgStatus, stopMAS
-
Constructor Details
-
DelegatedRuntimeServices
-
-
Method Details
-
registerDefaultAgArch
Description copied from interface:RuntimeServicesregister a class to be included as new agents archs- Specified by:
registerDefaultAgArchin interfaceRuntimeServices- Throws:
RemoteException
-
getDefaultAgArchs
- Specified by:
getDefaultAgArchsin interfaceRuntimeServices- Throws:
RemoteException
-
getNewAgentName
- Specified by:
getNewAgentNamein interfaceRuntimeServices- Throws:
RemoteException
-
createAgent
public String createAgent(String agName, String agSource, String agClass, List<String> archClasses, ClassParameters bbPars, Settings stts, Agent father) throws Exception, RemoteException Description copied from interface:RuntimeServicesCreates 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:
createAgentin interfaceRuntimeServices- Throws:
ExceptionRemoteException
-
isRunning
- Specified by:
isRunningin interfaceRuntimeServices- Throws:
RemoteException
-
startAgent
Description copied from interface:RuntimeServicesstarts an agent (e.g. create thread for it)- Specified by:
startAgentin interfaceRuntimeServices- Throws:
RemoteException
-
clone
public void clone(Agent source, List<String> archClasses, String agName) throws RemoteException, JasonException Description copied from interface:RuntimeServicesClones an agent and starts it- Specified by:
clonein interfaceRuntimeServices- Parameters:
source- : the agent used as source for beliefs, plans, ...archClasses- : agent architectures that will be usedagName- : the name of the clone return the agent arch created- Throws:
JasonExceptionRemoteException
-
getAgentsName
Description copied from interface:RuntimeServicesReturns a set of all agents' name- Specified by:
getAgentsNamein interfaceRuntimeServices- Throws:
RemoteException
-
getAgentsQty
Description copied from interface:RuntimeServicesGets the number of agents in the MAS.- Specified by:
getAgentsQtyin interfaceRuntimeServices- Throws:
RemoteException
-
getAgentSnapshot
Description copied from interface:RuntimeServicesgets a copy of some agent (BB, PL, ...)- Specified by:
getAgentSnapshotin interfaceRuntimeServices- Throws:
RemoteException
-
getMASName
- Specified by:
getMASNamein interfaceRuntimeServices- Throws:
RemoteException
-
loadASL
public String loadASL(String agName, String code, String sourceId, boolean replace) throws RemoteException Description copied from interface:RuntimeServicesloads some ASL code into some agent, if replace is true, the previous plans from the sourceID will be removed- Specified by:
loadASLin interfaceRuntimeServices- Throws:
RemoteException
-
runAsAgent
Description copied from interface:RuntimeServicesagent agName executes the code (in a new intention)- Specified by:
runAsAgentin interfaceRuntimeServices- Throws:
RemoteException
-
killAgent
Description copied from interface:RuntimeServicesKills the agent named agName as a requested by byAg. Agent.stopAg() method is called before the agent is removed.- Specified by:
killAgentin interfaceRuntimeServices- Throws:
RemoteException
-
stopMAS
Description copied from interface:RuntimeServicesStops all MAS (the agents, the environment, the controller, ...)- Specified by:
stopMASin interfaceRuntimeServices- Throws:
RemoteExceptionException
-
dfRegister
- Specified by:
dfRegisterin interfaceRuntimeServices- Throws:
RemoteException
-
dfDeRegister
- Specified by:
dfDeRegisterin interfaceRuntimeServices- Throws:
RemoteException
-
dfSearch
- Specified by:
dfSearchin interfaceRuntimeServices- Throws:
RemoteException
-
dfSubscribe
- Specified by:
dfSubscribein interfaceRuntimeServices- Throws:
RemoteException
-
getDF
- Specified by:
getDFin interfaceRuntimeServices- Throws:
RemoteException
-
getWP
- Specified by:
getWPin interfaceRuntimeServices- Throws:
RemoteException
-