Class WatcherControllerAction
- java.lang.Object
-
- repast.simphony.engine.controller.WatcherControllerAction
-
- All Implemented Interfaces:
ControllerAction
public class WatcherControllerAction extends Object implements ControllerAction
Controller action that associates the watcher mechanism with the master context and processes any objects already in the master context. Note that this should only be an action on the master context as all the objects in the sim are in the master context.- Version:
- $Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
- Author:
- Nick Collier
-
-
Constructor Summary
Constructors Constructor Description WatcherControllerAction(WatchAnnotationReader reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
batchCleanup(RunState runState, Object contextId)
Cleans up the action after a batch run (a set of runs).void
batchInitialize(RunState runState, Object contextId)
Initializes the action for a batch run (a set of runs).void
runCleanup(RunState runState, Object contextId)
Cleans up the action after a run just occurred.void
runInitialize(RunState runState, Object contextId, Parameters runParams)
Add a watch context listener to the master context and processes any objects already in the master context.int
watchCount()
Gets the number of watches.
-
-
-
Constructor Detail
-
WatcherControllerAction
public WatcherControllerAction(WatchAnnotationReader reader)
-
-
Method Detail
-
watchCount
public int watchCount()
Gets the number of watches.- Returns:
- the number of watches
-
runInitialize
public void runInitialize(RunState runState, Object contextId, Parameters runParams)
Add a watch context listener to the master context and processes any objects already in the master context. Any other contexts will be ignored.- Specified by:
runInitialize
in interfaceControllerAction
- Parameters:
runState
-contextId
-runParams
- the current run's parameters
-
batchInitialize
public void batchInitialize(RunState runState, Object contextId)
Description copied from interface:ControllerAction
Initializes the action for a batch run (a set of runs).- Specified by:
batchInitialize
in interfaceControllerAction
-
runCleanup
public void runCleanup(RunState runState, Object contextId)
Description copied from interface:ControllerAction
Cleans up the action after a run just occurred.- Specified by:
runCleanup
in interfaceControllerAction
- Parameters:
runState
- information on the run that just occurred
-
batchCleanup
public void batchCleanup(RunState runState, Object contextId)
Description copied from interface:ControllerAction
Cleans up the action after a batch run (a set of runs).- Specified by:
batchCleanup
in interfaceControllerAction
- Parameters:
runState
- information on the set of runs that just occurred
-
-