Package org.elasticsearch.script
Interface ScriptEngine
- All Superinterfaces:
AutoCloseable
,Closeable
A script language implementation.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
<FactoryType>
FactoryTypeCompiles a script.Set<ScriptContext<?>>
Script contexts supported by this engine.getType()
The language name used in the script APIs to refer to this scripting backend.
-
Method Details
-
getType
String getType()The language name used in the script APIs to refer to this scripting backend. -
compile
<FactoryType> FactoryType compile(String name, String code, ScriptContext<FactoryType> context, Map<String,String> params)Compiles a script.- Parameters:
name
- the name of the script.null
if it is anonymous (inline). For a stored script, its the identifier.code
- actual source of the scriptcontext
- the context this script will be used forparams
- compile-time parameters (such as flags to the compiler)- Returns:
- A compiled script of the FactoryType from
ScriptContext
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getSupportedContexts
Set<ScriptContext<?>> getSupportedContexts()Script contexts supported by this engine.
-