Package jason.infra.local
Class LocalEnvironment
java.lang.Object
jason.infra.local.LocalEnvironment
- All Implemented Interfaces:
EnvironmentInfraTier
This class implements the Local version of the environment infrastructure tier.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
act
(String agName, ActionExec action) called by the agent infra arch to perform an action in the environmentvoid
actionExecuted
(String agName, Structure actTerm, boolean success, Object infraData) called by the user implementation of the environment when the action was executedGets an object with infrastructure runtime servicesvoid
informAgsEnvironmentChanged
(String... agents) Sends a message to the given agents notifying them that the environment has changed (called by the user environment).boolean
returns true if the infrastructure environment is runningvoid
void
stop()
called before the end of MAS execution, it just calls the user environment class stop method.
-
Constructor Details
-
LocalEnvironment
- Throws:
JasonException
-
-
Method Details
-
isRunning
public boolean isRunning()Description copied from interface:EnvironmentInfraTier
returns true if the infrastructure environment is running- Specified by:
isRunning
in interfaceEnvironmentInfraTier
-
stop
public void stop()called before the end of MAS execution, it just calls the user environment class stop method. -
setUserEnvironment
-
getUserEnvironment
-
act
called by the agent infra arch to perform an action in the environment -
actionExecuted
Description copied from interface:EnvironmentInfraTier
called by the user implementation of the environment when the action was executed- Specified by:
actionExecuted
in interfaceEnvironmentInfraTier
-
informAgsEnvironmentChanged
Description copied from interface:EnvironmentInfraTier
Sends a message to the given agents notifying them that the environment has changed (called by the user environment). If no agent is informed, the notification is sent to all agents.- Specified by:
informAgsEnvironmentChanged
in interfaceEnvironmentInfraTier
-
getRuntimeServices
Description copied from interface:EnvironmentInfraTier
Gets an object with infrastructure runtime services- Specified by:
getRuntimeServices
in interfaceEnvironmentInfraTier
-