Class DefaultBindingsCustomizer
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.jsr223.DefaultBindingsCustomizer
-
- All Implemented Interfaces:
BindingsCustomizer
,Customizer
public class DefaultBindingsCustomizer extends Object implements BindingsCustomizer
Default implementation of theBindingsCustomizer
which adds bindings to theScriptContext.GLOBAL_SCOPE
.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Constructor Summary
Constructors Constructor Description DefaultBindingsCustomizer(Bindings bindings)
Creates a new object withScriptContext.GLOBAL_SCOPE
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bindings
getBindings()
Gets the bindings to add to aGremlinScriptEngine
.int
getScope()
Gets the scope to which the bindings apply.
-
-
-
Constructor Detail
-
DefaultBindingsCustomizer
public DefaultBindingsCustomizer(Bindings bindings)
Creates a new object withScriptContext.GLOBAL_SCOPE
.
-
-
Method Detail
-
getBindings
public Bindings getBindings()
Description copied from interface:BindingsCustomizer
Gets the bindings to add to aGremlinScriptEngine
.- Specified by:
getBindings
in interfaceBindingsCustomizer
-
getScope
public int getScope()
Description copied from interface:BindingsCustomizer
Gets the scope to which the bindings apply. The scope is determined by theScriptContext
values where "100" isEngineScope
(bindings apply to the currentGremlinScriptEngine
) and "200" isGlobalScope
(bindings apply to the engines created by the currentGremlinScriptEngineManager
.- Specified by:
getScope
in interfaceBindingsCustomizer
-
-