gridiq.simulation
Interface AgentManager

All Known Implementing Classes:
JADEAgentManager

public interface AgentManager

The AgentManager employs the Facade design pattern to provide a single point of control for all agents in the system. The adapter pattern is also employed by defining this interface in order to decouple the system from the actual agent system used, allowing other agent systems to be supported in the future. A concrete JADEAgentManager is provided to support the JADE agent platform.

Author:
colin

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.
 

Method Detail

startAgent

void startAgent(java.lang.String agentClass,
                Bus bus)
                throws java.lang.Exception
Start an agent of a given class with a reference to a given bus.

Parameters:
agentClass - The class of the agent.
bus - The bus the agent controls.
Throws:
java.lang.Exception

sendResultToAgent

void sendResultToAgent(BusResult result)
                       throws java.lang.Exception
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.

Parameters:
result - The simulation result for a bus.
Throws:
java.lang.Exception

initialise

void initialise()
                throws java.io.IOException
Initialises the agent platform and instantiates all agents required for the simulation.

Throws:
java.io.IOException

close

void close()
Shuts down the agent platform and destroys all agents.