Interface GremlinScriptEngineManager

  • All Known Implementing Classes:
    CachedGremlinScriptEngineManager, DefaultGremlinScriptEngineManager

    public interface GremlinScriptEngineManager
    The ScriptEngineManager implements a discovery, instantiation and configuration mechanism for GremlinScriptEngine classes and also maintains a collection of key/value pairs storing state shared by all engines created by it. This class uses the ServiceProvider mechanism to enumerate all the implementations of GremlinScriptEngineFactory. The ScriptEngineManager provides a method to return a list of all these factories as well as utility methods which look up factories on the basis of language name, file extension and mime type.

    The Bindings of key/value pairs, referred to as the "Global Scope" maintained by the manager is available to all instances of @code ScriptEngine} created by the GremlinScriptEngineManager. The values in the Bindings are generally exposed in all scripts.

    This interface is based quite heavily on the workings of the ScriptEngineManager supplied in the javax.script packages, but adds some additional features that are specific to Gremlin and TinkerPop. Unfortunately, it's not easily possible to extend ScriptEngineManager directly as there certain behaviors don't appear to be be straightforward to implement and member variables are all private. It is important to note that this interface is designed to provide support for "Gremlin-enabled" ScriptEngine instances (i.e. those that extend from GremlinScriptEngine) and is not meant to manage just any ScriptEngine instance that may be on the path.

    Author:
    Stephen Mallette (http://stephen.genoprime.com)