Class FWFunctionalityPipelineRunner
java.lang.Object
java.lang.Thread
net.simplace.pipe.control.FWFunctionalityPipelineRunner
- All Implemented Interfaces:
Runnable
Runs the pipeline of a
PipeLineFunctionality (parameter PipeID), synchronously via
runPipeline() or as thread. After a threaded run the result is passed to the functionality and the GUI
goes on to the next function, enables the go button or closes the function.- Author:
- Andreas Enders
-
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
ConstructorsConstructorDescriptionFWFunctionalityPipelineRunner(PipeLineFunctionality aFunctionality, String aInitFileName) Creates a runner with the pipelines from a definition file.FWFunctionalityPipelineRunner(PipeLineFunctionality aFunctionality, org.jdom2.Element aInitElement) Creates a runner with the pipelines from an element. -
Method Summary
Modifier and TypeMethodDescriptionvoidrun()Runs the pipeline as thread and passes the filtered result to the functionality.net.simplace.core.FWObservableRuns all processors of the pipeline given in the parameterPipeID.net.simplace.core.FWObservablerunPipeline(int aNumberOfSteps) Runs the pipeline given in the parameterPipeIDof the functionality.toString()Methods 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, yield
-
Constructor Details
-
FWFunctionalityPipelineRunner
public FWFunctionalityPipelineRunner(PipeLineFunctionality aFunctionality, String aInitFileName) throws PipeLineCreationException Creates a runner with the pipelines from a definition file.- Parameters:
aFunctionality- the functionality providing the parametersaInitFileName- name of the pipeline definition file (class path resource)- Throws:
PipeLineCreationException- if a pipeline cannot be created
-
FWFunctionalityPipelineRunner
public FWFunctionalityPipelineRunner(PipeLineFunctionality aFunctionality, org.jdom2.Element aInitElement) throws PipeLineCreationException Creates a runner with the pipelines from an element.- Parameters:
aFunctionality- the functionality providing the parametersaInitElement- element containing thepipelineselement- Throws:
PipeLineCreationException- if a pipeline cannot be created
-
-
Method Details
-
runPipeline
public net.simplace.core.FWObservable runPipeline(int aNumberOfSteps) throws PipeLineException, DatabaseInUseException Runs the pipeline given in the parameterPipeIDof the functionality. Afterwards the temporary directoryTEMPDIRis deleted, unlessdelete_temp_at_endisfalse.- Parameters:
aNumberOfSteps- maximum number of processors to run- Returns:
- the result of the pipeline
- Throws:
PipeLineException- if the pipeline cannot be found or failsDatabaseInUseException- if the database is already in use
-
runPipeline
public net.simplace.core.FWObservable runPipeline() throws PipeLineException, DatabaseInUseExceptionRuns all processors of the pipeline given in the parameterPipeID.- Returns:
- the result of the pipeline
- Throws:
PipeLineException- if the pipeline cannot be found or failsDatabaseInUseException- if the database is already in use
-
run
public void run()Runs the pipeline as thread and passes the filtered result to the functionality. Then goes on to the next function (ifgo_on_automatically), enables the go button (if there is a next function) or closes the function (hidden ifhide_view). Errors are shown in a dialog or logged. -
getPipeLineContainer
- Returns:
- the pipeline container
-
toString
-