Class AbstractAdamsExperimentRunner<T extends AbstractExperiment>
- java.lang.Object
-
- java.lang.Thread
-
- adams.gui.tools.wekamultiexperimenter.runner.AbstractExperimentRunner<T>
-
- adams.gui.tools.wekamultiexperimenter.runner.AbstractAdamsExperimentRunner<T>
-
- All Implemented Interfaces:
Serializable
,Runnable
- Direct Known Subclasses:
AdamsExperimentRunner
public abstract class AbstractAdamsExperimentRunner<T extends AbstractExperiment> extends AbstractExperimentRunner<T>
Ancestor for classes that handle running a copy of the experiment in a separate thread.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
-
Fields inherited from class adams.gui.tools.wekamultiexperimenter.runner.AbstractExperimentRunner
m_Aborted, m_Exp, m_Owner, m_Running, NOT_RUNNING
-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description AbstractAdamsExperimentRunner(ExperimenterPanel owner)
Initializes the thread.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abortExperiment()
Aborts the experiment.protected void
doInitialize()
Initializes the experiment.protected void
doRun()
Performs the actual running of the experiment.protected void
loadResults()
Examines the supplied experiment to determine the results destination and attempts to load the results.protected void
postRun(boolean success)
Hook method that gets executed after the experiment has finished (successfully or not).-
Methods inherited from class adams.gui.tools.wekamultiexperimenter.runner.AbstractExperimentRunner
isRunning, logError, logError, logMessage, logMessage, preRun, run, showStatus, update
-
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, yield
-
-
-
-
Constructor Detail
-
AbstractAdamsExperimentRunner
public AbstractAdamsExperimentRunner(ExperimenterPanel owner) throws Exception
Initializes the thread.- Parameters:
owner
- the experimenter this runner belongs to- Throws:
Exception
- if experiment is null or cannot be copied via serialization
-
-
Method Detail
-
doInitialize
protected void doInitialize() throws Exception
Initializes the experiment.- Specified by:
doInitialize
in classAbstractExperimentRunner<T extends AbstractExperiment>
- Throws:
Exception
- fails due to some error
-
loadResults
protected void loadResults()
Examines the supplied experiment to determine the results destination and attempts to load the results.
-
doRun
protected void doRun() throws Exception
Performs the actual running of the experiment.- Specified by:
doRun
in classAbstractExperimentRunner<T extends AbstractExperiment>
- Throws:
Exception
- fails due to some error
-
postRun
protected void postRun(boolean success)
Hook method that gets executed after the experiment has finished (successfully or not).- Overrides:
postRun
in classAbstractExperimentRunner<T extends AbstractExperiment>
- Parameters:
success
- whether successfully finished (neither error, nor aborted)
-
abortExperiment
public void abortExperiment()
Aborts the experiment.- Overrides:
abortExperiment
in classAbstractExperimentRunner<T extends AbstractExperiment>
-
-