jason.infra.saci
Class SaciEnvironment

Package class diagram package SaciEnvironment
java.lang.Object
  extended by saci.Agent
      extended by jason.infra.saci.SaciEnvironment
All Implemented Interfaces:
EnvironmentInfraTier, java.io.Serializable, java.lang.Runnable, saci.launcher.LaunchableAg, saci.launcher.MovableAg

public class SaciEnvironment
extends saci.Agent
implements EnvironmentInfraTier

This class implements the saci version of the environment infrastructure tier.

The Environment is implemented as an agent in a second saci society normally called <MASID>-env. The ordinary agents enter in two societies: the "normal" (used for inter-agent communication, and the environment society (used to get perception). The environment agent enter only in the second.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class saci.Agent
controlAg, mbox, mboxes, properties, running
 
Constructor Summary
SaciEnvironment()
           
 
Method Summary
 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
 void informAgsEnvironmentChanged(java.util.Collection 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).
 void initAg(java.lang.String[] args)
           
 void stopAg()
           
 
Methods inherited from class saci.Agent
destroy, enterSoc, enterSoc, enterSoc, enterSociety, getControlAg, getLauncher, getMBox, getMBox, getName, getProperty, getSociety, isRunning, leaveAllSocs, leaveSoc, leaveSoc, move, moveMBoxesToLocalHost, onMoved, onMoving, run, setControlAg, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jason.environment.EnvironmentInfraTier
isRunning
 

Constructor Detail

SaciEnvironment

public SaciEnvironment()
Method Detail

informAgsEnvironmentChanged

public void informAgsEnvironmentChanged(java.lang.String... agents)
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 interface EnvironmentInfraTier

informAgsEnvironmentChanged

public void informAgsEnvironmentChanged(java.util.Collection agentsToNotify)
Description copied from interface: EnvironmentInfraTier
Sends a message to a set of agents notifying them that the environment has changed. The collection has the agents' names. (called by the user environment).

Specified by:
informAgsEnvironmentChanged in interface EnvironmentInfraTier

initAg

public void initAg(java.lang.String[] args)
            throws JasonException
Specified by:
initAg in interface saci.launcher.LaunchableAg
Overrides:
initAg in class saci.Agent
Throws:
JasonException

actionExecuted

public void actionExecuted(java.lang.String agName,
                           Structure actTerm,
                           boolean success,
                           java.lang.Object infraData)
Description copied from interface: EnvironmentInfraTier
called by the user implementation of the environment when the action was executed

Specified by:
actionExecuted in interface EnvironmentInfraTier

stopAg

public void stopAg()
Specified by:
stopAg in interface saci.launcher.LaunchableAg
Overrides:
stopAg in class saci.Agent

getRuntimeServices

public RuntimeServicesInfraTier getRuntimeServices()
Description copied from interface: EnvironmentInfraTier
Gets an object with infrastructure runtime services

Specified by:
getRuntimeServices in interface EnvironmentInfraTier