public abstract class AbstractGremlinPlugin extends Object implements GremlinPlugin
RemoteAcceptor and may need access to those
shell and io objects.| Modifier and Type | Field and Description |
|---|---|
protected static String |
DOT_STAR |
static String |
ENV_CONSOLE_IO |
static String |
ENV_CONSOLE_SHELL |
protected static String |
IMPORT_SPACE |
protected static String |
IMPORT_STATIC_SPACE |
protected IO |
io |
protected boolean |
requireConsoleEnvironment |
protected Groovysh |
shell |
ENVIRONMENT| Constructor and Description |
|---|
AbstractGremlinPlugin()
Creates a new instance that does not force the plugin to require the console.
|
AbstractGremlinPlugin(boolean requireConsoleEnvironment)
Creates a new instance that allows the plugin to specify whether the console is required or not.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
afterPluginTo(PluginAcceptor pluginAcceptor)
Called after the
pluginTo(PluginAcceptor) method is executed which sets the io and
shell member variables. |
void |
pluginTo(PluginAcceptor pluginAcceptor)
Implementers will typically execute imports of classes within their project that they want available in the
console or they may use meta programming to introduce new extensions to the Gremlin.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, remoteAcceptor, requireRestartpublic static final String ENV_CONSOLE_IO
public static final String ENV_CONSOLE_SHELL
protected static final String IMPORT_SPACE
protected static final String IMPORT_STATIC_SPACE
protected static final String DOT_STAR
protected IO io
protected Groovysh shell
protected final boolean requireConsoleEnvironment
public AbstractGremlinPlugin()
public AbstractGremlinPlugin(boolean requireConsoleEnvironment)
IO or to Groovysh
methods in the plugin (as those classes are Gremlin Console related and cannot be provided outside of that
environment). For a plugin to work in the Gremlin Console and in Gremlin Server this value must be set
to false.public void pluginTo(PluginAcceptor pluginAcceptor) throws IllegalEnvironmentException, PluginInitializationException
io and shell member variables.pluginTo in interface GremlinPluginIllegalEnvironmentException - if requireConsoleEnvironment is set to true and if either
the io and shell member variables are null.PluginInitializationException - if there is a failure in the plugin iniitalization processpublic abstract void afterPluginTo(PluginAcceptor pluginAcceptor) throws IllegalEnvironmentException, PluginInitializationException
pluginTo(PluginAcceptor) method is executed which sets the io and
shell member variables.Copyright © 2013–2015 Apache Software Foundation. All rights reserved.