Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jason.infra.centralised
Class CentralisedEnvironment

    java.lang.Object
      jason.infra.centralised.CentralisedEnvironment

All Implemented Interfaces:
  EnvironmentInfraTier

    public class CentralisedEnvironment

extends java.lang.Object
implements EnvironmentInfraTier

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

Constructor Summary
`CentralisedEnvironment(ClassParameters userEnvArgs, RunCentralisedMAS masRunner)`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CentralisedEnvironment

    public CentralisedEnvironment(ClassParameters userEnvArgs,
                                  RunCentralisedMAS masRunner)
                           throws JasonException

Throws:
  `JasonException`

Method Detail

### isRunning

    public boolean isRunning()

  Description copied from interface: `EnvironmentInfraTier`
  returns true if the infrastructure environment is running

  Specified by:
    `isRunning` in interface `EnvironmentInfraTier`

### stop

    public void stop()

  called before the end of MAS execution, it just calls the user environment class stop method.

### setUserEnvironment

    public void setUserEnvironment(Environment env)

### getUserEnvironment

    public Environment getUserEnvironment()

### act

    public void act(java.lang.String agName,
                    ActionExec action)

  called by the agent infra arch to perform an action in the environment

### 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`

### 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<java.lang.String> 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`

### getRuntimeServices

    public RuntimeServicesInfraTier getRuntimeServices()

  Description copied from interface: `EnvironmentInfraTier`
  Gets an object with infrastructure runtime services

  Specified by:
    `getRuntimeServices` in interface `EnvironmentInfraTier`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD