anthill.nestor
Class LocalManager

java.lang.Object
  |
  +--anthill.nestor.LocalManager
All Implemented Interfaces:
Clearable, Manager

public class LocalManager
extends java.lang.Object
implements Manager

Class LocalManager is the implementation of Manager to be used during off-line simulations. No thread is used in this implementation; instead, the execution of the algorithm of a single ant may be forced by invoking method execute(). This method is used by Scenario implementations in order to force progress of the ant algorithm over the simulated network.

Version:
$Revision$
Author:
Alberto Montresor

Constructor Summary
LocalManager()
           
 
Method Summary
 void add(AntView view)
          Adds an ant to the queue of ants to be executed
 void clear()
          Restores the object to its initial state.
 void execute()
          Executes an ant stored in this LocalManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalManager

public LocalManager()
Method Detail

add

public void add(AntView view)
Adds an ant to the queue of ants to be executed
Specified by:
add in interface Manager
Parameters:
view - the ant to be added is encapsulated in a AntView

execute

public void execute()
Executes an ant stored in this LocalManager.
Specified by:
execute in interface Manager

clear

public void clear()
Restores the object to its initial state.
Specified by:
clear in interface Clearable