org.apache.tinkerpop.gremlin.jsr223

## Class GremlinScriptContext

- java.lang.Object
- - org.apache.tinkerpop.gremlin.jsr223.GremlinScriptContext

- All Implemented Interfaces:
    ScriptContext

      public class GremlinScriptContext
      extends Object
      implements ScriptContext

  A `ScriptContext` that doesn't create new instances of `Reader` and `Writer` 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 and Description
    `GremlinScriptContext(Reader in, Writer out, Writer error)` Create a `GremlinScriptContext`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GremlinScriptContext

          public GremlinScriptContext(Reader in,
                                      Writer out,
                                      Writer error)

      Create a `GremlinScriptContext`.

  - ### Method Detail

    - #### setBindings

          public void setBindings(Bindings bindings,
                                  int scope)

      Specified by:
        `setBindings` in interface `ScriptContext`

    - #### getAttribute

          public Object getAttribute(String name)

      Specified by:
        `getAttribute` in interface `ScriptContext`

    - #### getAttribute

          public Object getAttribute(String name,
                                     int scope)

      Specified by:
        `getAttribute` in interface `ScriptContext`

    - #### removeAttribute

          public Object removeAttribute(String name,
                                        int scope)

      Specified by:
        `removeAttribute` in interface `ScriptContext`

    - #### setAttribute

          public void setAttribute(String name,
                                   Object value,
                                   int scope)

      Specified by:
        `setAttribute` in interface `ScriptContext`

    - #### getAttributesScope

          public int getAttributesScope(String name)

      Specified by:
        `getAttributesScope` in interface `ScriptContext`

    - #### getBindings

          public Bindings getBindings(int scope)

      Specified by:
        `getBindings` in interface `ScriptContext`

    - #### getScopes

          public List<Integer> getScopes()

      Specified by:
        `getScopes` in interface `ScriptContext`

    - #### getWriter

          public Writer getWriter()

      Specified by:
        `getWriter` in interface `ScriptContext`

    - #### getReader

          public Reader getReader()

      Specified by:
        `getReader` in interface `ScriptContext`

    - #### setReader

          public void setReader(Reader reader)

      Specified by:
        `setReader` in interface `ScriptContext`

    - #### setWriter

          public void setWriter(Writer writer)

      Specified by:
        `setWriter` in interface `ScriptContext`

    - #### getErrorWriter

          public Writer getErrorWriter()

      Specified by:
        `getErrorWriter` in interface `ScriptContext`

    - #### setErrorWriter

          public void setErrorWriter(Writer writer)

      Specified by:
        `setErrorWriter` in interface `ScriptContext`

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.