Package com.assemblyrobot.simulator.core
Class Engine
java.lang.Object
java.lang.Thread
com.assemblyrobot.simulator.core.Engine
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
SimulatorEngine
public abstract class Engine
extends java.lang.Thread
Generic simulator engine. Used for running the simulation.
-
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
Constructors Constructor Description Engine() -
Method Summary
Modifier and Type Method Description voidendRun()Stops the engine.protected abstract voidinit()protected abstract voidonArrival(Event event)protected abstract voidonDeparture(Event event)protected abstract voidonTransfer(TransferEvent event)voidrun()Starts the Engine thread.Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yieldMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Engine
public Engine()
-
-
Method Details
-
run
public void run()Starts the Engine thread. Do not call this method manually; call the start() method instead.- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
endRun
public void endRun()Stops the engine. -
init
protected abstract void init() -
onArrival
-
onTransfer
-
onDeparture
-