Package Jade.Agents

Class MasterArbiterAgent

java.lang.Object
jade.core.Agent
Jade.Agents.MasterArbiterAgent
All Implemented Interfaces:
jade.core.TimerListener, jade.util.leap.Serializable, Serializable, Runnable

public class MasterArbiterAgent extends jade.core.Agent
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class jade.core.Agent

    jade.core.Agent.Interrupted
  • Field Summary

    Fields inherited from class jade.core.Agent

    AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN, MSG_QUEUE_CLASS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    jade.core.AID[]
    Returns the array of the arbiter agents
    jade.core.AID[]
    Returns the array of the player agents
    jade.core.AID
    Returns the winner agent AID
    void
    setArbiters(jade.core.AID[] players)
    Sets the array of the arbiter agents
    void
    setPlayers(jade.core.AID[] players)
    Sets the array of the player agents
    protected void
    Setups the agent for the game.
    void
    setWinner(jade.core.AID winner)
    Sets the winner agent AID
    protected void
     

    Methods inherited from class jade.core.Agent

    addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, createMessageQueue, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAID, getAMS, getArguments, getBootProperties, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AInterface, getO2AObject, getProperty, getQueueSize, getState, here, isAlive, isRestarting, join, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, registerO2AInterface, removeBehaviour, removeTimer, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setO2AManager, setQueueSize, waitUntilStarted, write

    Methods inherited from class java.lang.Object

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

    • MasterArbiterAgent

      public MasterArbiterAgent()
  • Method Details

    • setup

      protected void setup()
      Setups the agent for the game. In the following order the agent: - Register himself in the DF - Waits for all the players and arbiters to be ready - Adds a behaviour to assign all the arbiters to the players and wait for the games to finish
      Overrides:
      setup in class jade.core.Agent
    • takeDown

      protected void takeDown()
      Overrides:
      takeDown in class jade.core.Agent
    • getPlayers

      public jade.core.AID[] getPlayers()
      Returns the array of the player agents
      Returns:
      AID[]
    • setPlayers

      public void setPlayers(jade.core.AID[] players)
      Sets the array of the player agents
      Parameters:
      players -
    • getArbiters

      public jade.core.AID[] getArbiters()
      Returns the array of the arbiter agents
      Returns:
      AID[]
    • setArbiters

      public void setArbiters(jade.core.AID[] players)
      Sets the array of the arbiter agents
      Parameters:
      players -
    • getWinner

      public jade.core.AID getWinner()
      Returns the winner agent AID
      Returns:
      AID
    • setWinner

      public void setWinner(jade.core.AID winner)
      Sets the winner agent AID
      Parameters:
      winner -