Class GremlinScriptContext
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.jsr223.GremlinScriptContext
-
- All Implemented Interfaces:
ScriptContext
public class GremlinScriptContext extends Object implements ScriptContext
AScriptContext
that doesn't create new instances ofReader
andWriter
classes on initialization.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Field Summary
-
Fields inherited from interface javax.script.ScriptContext
ENGINE_SCOPE, GLOBAL_SCOPE
-
-
Constructor Summary
Constructors Constructor Description GremlinScriptContext(Reader in, Writer out, Writer error)
Create aGremlinScriptContext
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getAttribute(String name)
Object
getAttribute(String name, int scope)
int
getAttributesScope(String name)
Bindings
getBindings(int scope)
Writer
getErrorWriter()
Reader
getReader()
List<Integer>
getScopes()
Writer
getWriter()
Object
removeAttribute(String name, int scope)
void
setAttribute(String name, Object value, int scope)
void
setBindings(Bindings bindings, int scope)
void
setErrorWriter(Writer writer)
void
setReader(Reader reader)
void
setWriter(Writer writer)
-
-
-
Method Detail
-
setBindings
public void setBindings(Bindings bindings, int scope)
- Specified by:
setBindings
in interfaceScriptContext
-
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttribute
in interfaceScriptContext
-
getAttribute
public Object getAttribute(String name, int scope)
- Specified by:
getAttribute
in interfaceScriptContext
-
removeAttribute
public Object removeAttribute(String name, int scope)
- Specified by:
removeAttribute
in interfaceScriptContext
-
setAttribute
public void setAttribute(String name, Object value, int scope)
- Specified by:
setAttribute
in interfaceScriptContext
-
getAttributesScope
public int getAttributesScope(String name)
- Specified by:
getAttributesScope
in interfaceScriptContext
-
getBindings
public Bindings getBindings(int scope)
- Specified by:
getBindings
in interfaceScriptContext
-
getScopes
public List<Integer> getScopes()
- Specified by:
getScopes
in interfaceScriptContext
-
getWriter
public Writer getWriter()
- Specified by:
getWriter
in interfaceScriptContext
-
getReader
public Reader getReader()
- Specified by:
getReader
in interfaceScriptContext
-
setReader
public void setReader(Reader reader)
- Specified by:
setReader
in interfaceScriptContext
-
setWriter
public void setWriter(Writer writer)
- Specified by:
setWriter
in interfaceScriptContext
-
getErrorWriter
public Writer getErrorWriter()
- Specified by:
getErrorWriter
in interfaceScriptContext
-
setErrorWriter
public void setErrorWriter(Writer writer)
- Specified by:
setErrorWriter
in interfaceScriptContext
-
-