antsim.nestor
Class LocalManager
java.lang.Object
|
+--antsim.nestor.LocalManager
- All Implemented Interfaces:
- Clearable, Manager
- public class LocalManager
- extends 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: 1.3 $
- Author:
- Alberto Montresor
Fields inherited from interface anthill.nest.Manager |
NAME |
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 |
LocalManager
public LocalManager(Factory factory,
String name)
- Parameters:
factory
- the factory to be used to read configuration arguments
and to create other configurable objectsname
- the name that is associated to this instance in the
configuration file
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