Class RuleFunctionality
java.lang.Object
java.lang.Thread
net.simplace.pipe.functionality.FWAbstractFunctionality
net.simplace.pipe.functionalities.RuleFunctionality
- All Implemented Interfaces:
Runnable
Switch point of the function chain: a function without view that evaluates its rules (see
FWRuleSet) and
goes on to the function they select. The reserved targets nextFunction and
previousFunction give the id of the function to run when the switch point was reached going forward
resp. going back (parameter FWAbstractFunctionality.DIRECTION, set by the client controller); all other
rules set parameters.
<function id="sim_work.switch.result" class="net.simplace.pipe.functionalities.RuleFunctionality"
ressource="">
<rule target="sim_work.multiple">${sim_work.simulationcount} gt 1</rule>
<rule target="nextFunction">
${sim_work.multiple} ? 'sim_work.form.result_simulation' : 'sim_work.form.result_variable'
</rule>
<rule target="previousFunction">'sim_work.start'</rule>
</function>
If the rule for the direction is missing or gives no value, the attribute nextFunction resp.
previousFunction of the function is used.- Author:
- Andreas Enders
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringreserved target: id of the function to run when going forwardstatic final Stringreserved target: id of the function to run when going backFields inherited from class FWAbstractFunctionality
DIRECTION, DIRECTION_BACK, DIRECTION_NEXTFields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidImplements the function; called whenever the functionality is run.Methods inherited from class FWAbstractFunctionality
getCenterPanel, getCurrentThread, getFunctionElement, getID, getInfoElements, getLocaleValue, getMainComponent, getMainFrame, getNextFunction, getObservable, getOID, getParameter, getPreviousFunction, getStringParameterValue, getSystemID, hasInfoElements, initialize, initialize, run, runFunctionality, setCenterPanel, setObservable, setOutputParameter, setRunningThread, shouldFunctionBeRun, stopThread, toXMLMethods 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, toString, yield
-
Field Details
-
NEXT_FUNCTION
reserved target: id of the function to run when going forward- See Also:
-
PREVIOUS_FUNCTION
reserved target: id of the function to run when going back- See Also:
-
-
Constructor Details
-
RuleFunctionality
public RuleFunctionality()
-
-
Method Details
-
startFunctionality
Description copied from class:FWAbstractFunctionalityImplements the function; called whenever the functionality is run.- Specified by:
startFunctionalityin classFWAbstractFunctionality- Throws:
Exception- if the function fails
-