public class CentralisedEnvironment extends java.lang.Object implements EnvironmentInfraTier
Constructor and Description |
---|
CentralisedEnvironment(ClassParameters userEnvArgs,
RunCentralisedMAS masRunner) |
Modifier and Type | Method and Description |
---|---|
void |
act(java.lang.String agName,
ActionExec action)
called by the agent infra arch to perform an action in the environment
|
void |
actionExecuted(java.lang.String agName,
Structure actTerm,
boolean success,
java.lang.Object infraData)
called by the user implementation of the environment when the action was executed
|
RuntimeServicesInfraTier |
getRuntimeServices()
Gets an object with infrastructure runtime services
|
Environment |
getUserEnvironment() |
void |
informAgsEnvironmentChanged(java.util.Collection<java.lang.String> agentsToNotify)
Sends a message to a set of agents notifying them that the environment has changed.
|
void |
informAgsEnvironmentChanged(java.lang.String... agents)
Sends a message to the given agents notifying them that the environment has changed
(called by the user environment).
|
boolean |
isRunning()
returns true if the infrastructure environment is running
|
void |
setUserEnvironment(Environment env) |
void |
stop()
called before the end of MAS execution, it just calls the user environment class stop method.
|
public CentralisedEnvironment(ClassParameters userEnvArgs, RunCentralisedMAS masRunner) throws JasonException
JasonException
public boolean isRunning()
EnvironmentInfraTier
isRunning
in interface EnvironmentInfraTier
public void stop()
public void setUserEnvironment(Environment env)
public Environment getUserEnvironment()
public void act(java.lang.String agName, ActionExec action)
public void actionExecuted(java.lang.String agName, Structure actTerm, boolean success, java.lang.Object infraData)
EnvironmentInfraTier
actionExecuted
in interface EnvironmentInfraTier
public void informAgsEnvironmentChanged(java.lang.String... agents)
EnvironmentInfraTier
informAgsEnvironmentChanged
in interface EnvironmentInfraTier
public void informAgsEnvironmentChanged(java.util.Collection<java.lang.String> agentsToNotify)
EnvironmentInfraTier
informAgsEnvironmentChanged
in interface EnvironmentInfraTier
public RuntimeServicesInfraTier getRuntimeServices()
EnvironmentInfraTier
getRuntimeServices
in interface EnvironmentInfraTier