com.goldenhammer.modality
Class SimulationThread

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.goldenhammer.modality.SimulationThread
All Implemented Interfaces:
java.lang.Runnable

public class SimulationThread
extends java.lang.Thread

This class is responsible for running the test profile against the specified modality


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SimulationThread(Modality theModality, Node theNode, java.util.logging.Logger logger)
          default constructor.
 
Method Summary
 Modality getModality()
           
 boolean isRunning()
           
 void run()
           
 void setRunning(boolean running)
           
 void stopSimulation()
          Notifies the thread that the simulation should be stopped
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimulationThread

public SimulationThread(Modality theModality,
                        Node theNode,
                        java.util.logging.Logger logger)
default constructor. Takes a modality & the test profile (both required)

Method Detail

run

public void run()

getModality

public Modality getModality()
Returns:
Returns the modality.

stopSimulation

public void stopSimulation()
Notifies the thread that the simulation should be stopped


isRunning

public boolean isRunning()
Returns:
Returns the running.

setRunning

public void setRunning(boolean running)
Parameters:
running - The running to set.