public class ScriptAlgorithmExecutor extends AbstractAlgorithmExecutor
This class will create and compile on-the-fly ValueBinding implementations for every unique combination of raw and eng types. The reason for this is to get the mapping correct from Java to JavaScript. Rhino (the default JavaScript engine for JDK ≤ 7) will map java Float, Integer, etc towards javascript Object, instead of Number. As a result, in javascript, using the plus operator on two supposed numbers would do a string concatenation instead of an addition.
Rather than changing the Rhino configuration (which would require drastic tampering of the maven-compiler-plugin in order to lift Sun's Access Restrictions on these internal classes), we generate classes with primitive raw/eng values when needed.
algorithmDef, execCtx, execListeners, mandatoryToRun, requiredParameters| Constructor and Description |
|---|
ScriptAlgorithmExecutor(CustomAlgorithm algorithmDef,
Invocable invocable,
String functionName,
AlgorithmExecutionContext execCtx,
EventProducer eventProducer) |
| Modifier and Type | Method and Description |
|---|---|
List<ParameterValue> |
runAlgorithm(long acqTime,
long genTime)
Runs the associated algorithm with the latest InputParameters
|
String |
toString() |
protected void |
updateInput(InputParameter inputParameter,
ParameterValue newValue) |
addExecListener, getAlgorithm, getExecutionContext, getLookbackSize, getRequiredParameters, propagateToListeners, updateParameterspublic ScriptAlgorithmExecutor(CustomAlgorithm algorithmDef, Invocable invocable, String functionName, AlgorithmExecutionContext execCtx, EventProducer eventProducer)
protected void updateInput(InputParameter inputParameter, ParameterValue newValue)
updateInput in class AbstractAlgorithmExecutorpublic List<ParameterValue> runAlgorithm(long acqTime, long genTime)
AlgorithmExecutorCopyright © 2018 Space Applications Services. All rights reserved.