GremlinScriptEngineManager.@Deprecated public class ScriptEngines extends Object implements AutoCloseable
ScriptEngine objects for the server.| Constructor and Description | 
|---|
| ScriptEngines(Consumer<ScriptEngines> initializer)Deprecated.  Creates a new object. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addImports(Set<String> imports)Deprecated.  Perform append to the existing import list for all  ScriptEngineinstances that implement theDependencyManagerinterface. | 
| void | close()Deprecated.  Iterate through all the  ScriptEngineimplementations and if they implementAutoCloseablethen call theAutoCloseable.close()method. | 
| CompiledScript | compile(Reader script,
       String language)Deprecated.  Compiles a script without executing it. | 
| CompiledScript | compile(String script,
       String language)Deprecated.  Compiles a script without executing it. | 
| Map<String,List<Map>> | dependencies()Deprecated.  List dependencies for those  ScriptEngineobjects that implement theDependencyManagerinterface. | 
| Traversal.Admin | eval(Bytecode bytecode,
    Bindings bindings,
    String language)Deprecated. 
 As of release 3.2.7, replaced by  eval(Bytecode, Bindings, String, String). | 
| Traversal.Admin | eval(Bytecode bytecode,
    Bindings bindings,
    String language,
    String traversalSource)Deprecated.  | 
| Object | eval(Reader reader,
    Bindings bindings,
    String language)Deprecated.  Evaluate a script with  Bindingsfor a particular language. | 
| Object | eval(String script,
    Bindings bindings,
    String language)Deprecated.  Evaluate a script with  Bindingsfor a particular language. | 
| GremlinScriptEngine | getEngineByName(String engineName)Deprecated.  Gets an  GremlinScriptEngineby its name. | 
| Map<String,List<Map>> | imports()Deprecated.  List the imports for those  ScriptEngineobjects that implement theDependencyManagerinterface. | 
| void | loadPlugins(List<GremlinPlugin> plugins)Deprecated.  For each  DependencyManagertry to load the specified plugins. | 
| void | reload(String language,
      Set<String> imports,
      Set<String> staticImports,
      Map<String,Object> config)Deprecated.  Reload a  ScriptEnginewith fresh imports. | 
| void | reset()Deprecated.  Resets the ScriptEngines and re-initializes them. | 
| List<GremlinPlugin> | use(String group,
   String artifact,
   String version)Deprecated.  Pull in dependencies given some Maven coordinates. | 
public ScriptEngines(Consumer<ScriptEngines> initializer)
initializer - allows for external initialization of the newly created ScriptEngines objectpublic Traversal.Admin eval(Bytecode bytecode, Bindings bindings, String language) throws ScriptException
eval(Bytecode, Bindings, String, String).ScriptExceptionpublic Traversal.Admin eval(Bytecode bytecode, Bindings bindings, String language, String traversalSource) throws ScriptException
ScriptExceptionpublic Object eval(String script, Bindings bindings, String language) throws ScriptException
Bindings for a particular language.ScriptExceptionpublic Object eval(Reader reader, Bindings bindings, String language) throws ScriptException
Bindings for a particular language.ScriptExceptionpublic CompiledScript compile(String script, String language) throws ScriptException
UnsupportedOperationException - if the ScriptEngine implementation does not implement
                                       the Compilable interface.ScriptExceptionpublic CompiledScript compile(Reader script, String language) throws ScriptException
UnsupportedOperationException - if the ScriptEngine implementation does not implement
                                       the Compilable interface.ScriptExceptionpublic void reload(String language, Set<String> imports, Set<String> staticImports, Map<String,Object> config)
ScriptEngine with fresh imports.  Waits for any existing script evaluations to complete but
 then blocks other operations until complete.public void addImports(Set<String> imports)
ScriptEngine instances that implement the
 DependencyManager interface.  Waits for any existing script evaluations to complete but
 then blocks other operations until complete.public List<GremlinPlugin> use(String group, String artifact, String version)
ScriptEngine and determine if it
 implements DependencyManager.  For those that do call the @{link DependencyManager#use} method to fire
 it up.  Waits for any existing script evaluations to complete but then blocks other operations until complete.public void loadPlugins(List<GremlinPlugin> plugins)
DependencyManager try to load the specified plugins.public void close()
           throws Exception
ScriptEngine implementations and if they implement AutoCloseable
 then call the AutoCloseable.close() method. After that is complete, the script engine cache will be
 cleared.close in interface AutoCloseableExceptionpublic void reset()
public Map<String,List<Map>> dependencies()
ScriptEngine objects that implement the DependencyManager interface.public Map<String,List<Map>> imports()
ScriptEngine objects that implement the DependencyManager interface.public GremlinScriptEngine getEngineByName(String engineName)
GremlinScriptEngine by its name.Copyright © 2013–2018 Apache Software Foundation. All rights reserved.