Package org.elasticsearch.script
Interface ScriptEngine
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
public interface ScriptEngine extends java.io.CloseableA script language implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()<FactoryType>
FactoryTypecompile(java.lang.String name, java.lang.String code, ScriptContext<FactoryType> context, java.util.Map<java.lang.String,java.lang.String> params)Compiles a script.java.lang.StringgetType()The language name used in the script APIs to refer to this scripting backend.
-
-
-
Method Detail
-
getType
java.lang.String getType()
The language name used in the script APIs to refer to this scripting backend.
-
compile
<FactoryType> FactoryType compile(java.lang.String name, java.lang.String code, ScriptContext<FactoryType> context, java.util.Map<java.lang.String,java.lang.String> params)Compiles a script.- Parameters:
name- the name of the script.nullif 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
default void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-