Class PADispatcherThread
java.lang.Object
java.lang.Thread
common.controller.PADispatcherThread
- All Implemented Interfaces:
AbortMeasure, Runnable
Title: PADispatcherThread
Description: This thread is responsible for dispatching several simulations. If a simulation max time has been specified, an inner thread will be used to stop simulation after that time. We do not rely on engine method as it does not appear to work properly.
The step loop itself lives in ParametricAnalysisRunner, which has no
Swing dependency; this class adds the progress window, the results window and
the toolbar state that only make sense with a GUI attached.
- Author:
- Francesco D'Aquino Date: 29-dic-2005 Time: 9.58.49 Fixed by Bertoli Marco
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionPADispatcherThread(GuiInterface gui, SimulationDefinition simd, PAProgressWindow papw) Construct a new Parametric Analysis Dispatcher Thread -
Method Summary
Modifier and TypeMethodDescriptionvoidabortMeasure(int index) Aborts a measure, given its indexvoidPauses current simulation only if it was already startedvoidRestarts current simulation, forcing abort of all measures, only if it was already startedvoidrun()voidStops current simulation, forcing abort of all measures, only if it was already startedMethods inherited from class Thread
activeCount, checkAccess, clone, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, threadId, toString, yield
-
Constructor Details
-
PADispatcherThread
Construct a new Parametric Analysis Dispatcher Thread- Parameters:
gui- reference to current gui object (can be JSIMMain or Mediator)simd- Reference to the simulation definition
-
-
Method Details
-
pauseSimulation
public void pauseSimulation()Pauses current simulation only if it was already started -
stopSimulation
public void stopSimulation()Stops current simulation, forcing abort of all measures, only if it was already started -
restartSimulation
public void restartSimulation()Restarts current simulation, forcing abort of all measures, only if it was already started -
abortMeasure
public void abortMeasure(int index) Aborts a measure, given its index- Specified by:
abortMeasurein interfaceAbortMeasure- Parameters:
index- index of the measure to be aborted
-
run
-