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() |
AbstractGremlinPlugin(boolean requireConsoleEnvironment) |
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, wait
getName, remoteAcceptor, requireRestart
public 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)
public void pluginTo(PluginAcceptor pluginAcceptor) throws IllegalEnvironmentException, PluginInitializationException
io
and shell
member variables.pluginTo
in interface GremlinPlugin
IllegalEnvironmentException
- 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.