urv.emulator.tasks
Class EmulatorTask

java.lang.Object
  extended by java.lang.Thread
      extended by urv.emulator.tasks.EmulatorTask
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
CommunicationStatsTask, MembershipStatsTask, TopologyChangesTask

public abstract class EmulatorTask
extends java.lang.Thread

Each class that wants to be run in the simulator must extends this class

Author:
Marcel Arrufat Arias

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
EmulatorTask()
           
 
Method Summary
abstract  void doSomething()
           
 java.lang.String getClassName()
           
 EmulationController getEmulationController()
           
 void print(java.lang.String str, boolean outputToFile)
           
 void run()
           
 void setEmulationController(EmulationController emulationController)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

EmulatorTask

public EmulatorTask()
Method Detail

doSomething

public abstract void doSomething()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

print

public void print(java.lang.String str,
                  boolean outputToFile)

getClassName

public java.lang.String getClassName()
Returns:
Returns the className.

getEmulationController

public EmulationController getEmulationController()
Returns:
Returns the emulationController.

setEmulationController

public void setEmulationController(EmulationController emulationController)