java.lang.Object
jade.core.behaviours.Behaviour
jade.core.behaviours.SimpleBehaviour
eu.su.mas.dedale.mas.agent.behaviours.platformManagment.startMyBehaviours
All Implemented Interfaces:
jade.util.leap.Serializable, java.io.Serializable

public class startMyBehaviours
extends jade.core.behaviours.SimpleBehaviour
This behaviour must be the only one added directly to any dedale agent.

It allows the agent to wait for its deployment in the environment before triggering its associated behaviours.

Indeed, an agent have to wait for the gatekeeper to deliver a reference to the env before calling the Environment's API {@see DummyMovingAgent} source code for an example

Author:
hc
See Also:
Serialized Form
  • Field Summary

    Fields inherited from class jade.core.behaviours.Behaviour

    STATE_BLOCKED, STATE_READY, STATE_RUNNING
  • Constructor Summary

    Constructors 
    Constructor Description
    startMyBehaviours​(AbstractDedaleAgent a, java.util.List<jade.core.behaviours.Behaviour> behaviourList)  
  • Method Summary

    Modifier and Type Method Description
    void action()  
    boolean done()  

    Methods inherited from class jade.core.behaviours.SimpleBehaviour

    reset

    Methods inherited from class jade.core.behaviours.Behaviour

    actionWrapper, block, block, getAgent, getBehaviourName, getDataStore, getExecutionState, getRestartCounter, handleRestartEvent, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • startMyBehaviours

      public startMyBehaviours​(AbstractDedaleAgent a, java.util.List<jade.core.behaviours.Behaviour> behaviourList)
      Parameters:
      a - ref to the agent
      behaviourList - the list of behaviours to be added after the agent a is deployed in the environment e.g.

      List lb=new ArrayList();

      lb.add(new RandomWalkBehaviour(this));

      addBehaviour(new startMyBehaviours(this,lb));

  • Method Details

    • action

      public void action()
      Specified by:
      action in class jade.core.behaviours.Behaviour
    • done

      public boolean done()
      Specified by:
      done in class jade.core.behaviours.Behaviour