org.apache.tinkerpop.gremlin.jsr223

## Class AbstractGremlinPlugin

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

- All Implemented Interfaces:
    GremlinPlugin
  Direct Known Subclasses:
    BindingsGremlinPlugin, CredentialGraphGremlinPlugin, GiraphGremlinPlugin, GremlinServerGremlinPlugin, GroovyCompilerGremlinPlugin, HadoopGremlinPlugin, ImportGremlinPlugin, Neo4jGremlinPlugin, ScriptFileGremlinPlugin, SparkGremlinPlugin, SugarGremlinPlugin, TinkerGraphGremlinPlugin

      public abstract class AbstractGremlinPlugin
      extends Object
      implements GremlinPlugin

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Set<String>` | `appliesTo`
    `protected Customizer[]` | `customizers`
    `protected String` | `moduleName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractGremlinPlugin(String moduleName, Customizer... customizers)` Creates a base `GremlinPlugin` that will apply to all `GremlinScriptEngine` instances.
    `AbstractGremlinPlugin(String moduleName, Set<String> appliesTo, Customizer... customizers)` Creates a base `GremlinPlugin` that will apply to specific `GremlinScriptEngine` instances.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<Customizer[]>` | `getCustomizers(String scriptEngineName)` Gets the list of `Customizer` implementations to assign to a new `GremlinScriptEngine`.
    `String` | `getName()` The name of the module.

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

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

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.jsr223.GremlinPlugin

      `getCustomizers, requireRestart`

- - ### Field Detail

    - #### moduleName

          protected final String moduleName

    - #### customizers

          protected final Customizer[] customizers

    - #### appliesTo

          protected final Set<String> appliesTo

  - ### Constructor Detail

    - #### AbstractGremlinPlugin

          public AbstractGremlinPlugin(String moduleName,
                                       Customizer... customizers)

      Creates a base `GremlinPlugin` that will apply to all `GremlinScriptEngine` instances.

    - #### AbstractGremlinPlugin

          public AbstractGremlinPlugin(String moduleName,
                                       Set<String> appliesTo,
                                       Customizer... customizers)

      Creates a base `GremlinPlugin` that will apply to specific `GremlinScriptEngine` instances.

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `GremlinPlugin`
      The name of the module. This name should be unique (use a namespaced approach) as naming clashes will prevent proper module operations. Modules developed by TinkerPop will be prefixed with "tinkerpop." For example, TinkerPop's implementation of Giraph would be named "tinkerpop.giraph". If Facebook were to do their own implementation the implementation might be called "facebook.giraph".
      Specified by:
        `getName` in interface `GremlinPlugin`

    - #### getCustomizers

          public Optional<Customizer[]> getCustomizers(String scriptEngineName)

      Description copied from interface: `GremlinPlugin`
      Gets the list of `Customizer` implementations to assign to a new `GremlinScriptEngine`. The implementation should filter the returned `Customizers` according to the supplied name of the Gremlin-enabled `ScriptEngine`. By providing a filter, `GremlinModule` developers can have the ability to target specific `ScriptEngines`.
      Specified by:
        `getCustomizers` in interface `GremlinPlugin`
      Parameters:
        `scriptEngineName` - The name of the `ScriptEngine` or null to get all the available `Customizers`

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