Class JSR223Variable
-
- All Implemented Interfaces:
-
it.unibo.alchemist.boundary.DependentVariable
,java.io.Serializable
public final class JSR223Variable implements DependentVariable<Any>
This variable loads any JSR-233 language available in the classpath.
-
-
Constructor Summary
Constructors Constructor Description JSR223Variable(String language, String formula, Long timeout)
builds a new JSR223Variable given a language name and a script. JSR223Variable(String language, String formula)
builds a new JSR223Variable given a language name and a script.
-
Method Summary
Modifier and Type Method Description final String
getLanguage()
final String
getFormula()
final Long
getTimeout()
Object
getWith(Map<String, Object> variables)
Given the current controlled variables, computes the current values for this variable. -
-
Constructor Detail
-
JSR223Variable
JSR223Variable(String language, String formula, Long timeout)
builds a new JSR223Variable given a language name and a script.- Parameters:
language
- can be the name of the language, the file extension, or its mime typeformula
- the script that will get interpretedtimeout
- how long should the interpreter be allowed to compute before giving up, in ms.
-
-
Method Detail
-
getLanguage
final String getLanguage()
-
getFormula
final String getFormula()
-
getTimeout
final Long getTimeout()
-
-
-
-