antsim.impl
Class GenericScenarioAnalyzer
java.lang.Object
|
+--antsim.impl.GenericScenarioAnalyzer
- All Implemented Interfaces:
- Clearable, ScenarioAnalyzer
- public class GenericScenarioAnalyzer
- extends Object
- implements ScenarioAnalyzer
This class implements the ScenarioAnalyzer
interface; its
task is to print the content of the statistics object whenever the
analyze
method is invoked.
- Version:
- $Revision: 1.3 $
- Author:
- Alberto Montresor
Method Summary |
void |
analyze(Stats stats,
Peernet peernet)
Performs an analysis on the state of the simulated P2P network.
|
void |
clear()
Restores the object to its initial state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericScenarioAnalyzer
public GenericScenarioAnalyzer(Factory factory,
String name)
- Instantiates a new GenericScenarioAnalyzer. This implementation
simply prints out the
- 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
clear
public void clear()
- Restores the object to its initial state.
- Specified by:
clear
in interface Clearable
analyze
public void analyze(Stats stats,
Peernet peernet)
- Performs an analysis on the state of the simulated P2P network.
This implementation simply prints out the statistics collected
at runtime in the statistics object
- Specified by:
analyze
in interface ScenarioAnalyzer
- Parameters:
stats
- the object used to collect statisticspeernet
- the simulated P2P network, whose content can
be inspected by accessing the storage objects included in it.