gridiq.simulation
Class JADEAgentManager

java.lang.Object
  extended by gridiq.simulation.JADEAgentManager
All Implemented Interfaces:
AgentManager

public class JADEAgentManager
extends java.lang.Object
implements AgentManager

A concrete implementation of AgentManager to support the JADE agent platform.

Author:
colin

Constructor Summary
JADEAgentManager()
           
 
Method Summary
 void close()
          Shuts down the agent platform and destroys all agents.
 void initialise()
          Initialises the agent platform and instantiates all agents required for the simulation.
 void sendResultToAgent(BusResult result)
          Notifies an agent of a simulation result for its bus.
 void startAgent(java.lang.String agentClass, Bus bus)
          Start an agent of a given class with a reference to a given bus.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JADEAgentManager

public JADEAgentManager()
Method Detail

startAgent

public void startAgent(java.lang.String agentClass,
                       Bus bus)
                throws jade.wrapper.StaleProxyException
Description copied from interface: AgentManager
Start an agent of a given class with a reference to a given bus.

Specified by:
startAgent in interface AgentManager
Parameters:
agentClass - The class of the agent.
bus - The bus the agent controls.
Throws:
jade.wrapper.StaleProxyException

sendResultToAgent

public void sendResultToAgent(BusResult result)
                       throws jade.wrapper.StaleProxyException
Description copied from interface: AgentManager
Notifies an agent of a simulation result for its bus. The agent which is notified is the one controlling the bus for which the given result is for.

Specified by:
sendResultToAgent in interface AgentManager
Parameters:
result - The simulation result for a bus.
Throws:
jade.wrapper.StaleProxyException

initialise

public void initialise()
                throws java.io.IOException
Description copied from interface: AgentManager
Initialises the agent platform and instantiates all agents required for the simulation.

Specified by:
initialise in interface AgentManager
Throws:
java.io.IOException

close

public void close()
Description copied from interface: AgentManager
Shuts down the agent platform and destroys all agents.

Specified by:
close in interface AgentManager