public final class HadoopRemoteAcceptor extends Object implements RemoteAcceptor
RESULT
Constructor and Description |
---|
HadoopRemoteAcceptor(GremlinShellEnvironment shellEnvironment) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowRemoteConsole()
If the
RemoteAcceptor is used in the Gremlin Console, then this method might be called to determine
if it can be used in a fashion that supports the :remote console command. |
void |
close() |
Object |
configure(List<String> args)
Gets called when
:remote is used in conjunction with the config option. |
Object |
connect(List<String> args)
Gets called when
:remote is used in conjunction with the "connect" option. |
static String |
getScript(String submittedScript,
GremlinShellEnvironment shell)
Retrieve a script as defined in the shell context.
|
Object |
submit(List<String> args)
Gets called when
:submit is executed. |
public HadoopRemoteAcceptor(GremlinShellEnvironment shellEnvironment)
public Object connect(List<String> args) throws RemoteException
RemoteAcceptor
:remote
is used in conjunction with the "connect" option. It is up to the
implementation to decide how additional arguments on the line should be treated after "connect".connect
in interface RemoteAcceptor
RemoteException
- if there is a problem with connectingpublic Object configure(List<String> args) throws RemoteException
RemoteAcceptor
:remote
is used in conjunction with the config
option. It is up to the
implementation to decide how additional arguments on the line should be treated after config
.configure
in interface RemoteAcceptor
RemoteException
- if there is a problem with configurationpublic Object submit(List<String> args) throws RemoteException
RemoteAcceptor
:submit
is executed. It is up to the implementation to decide how additional
arguments on the line should be treated after :submit
.submit
in interface RemoteAcceptor
RemoteException
- if there is a problem with submissionpublic boolean allowRemoteConsole()
RemoteAcceptor
RemoteAcceptor
is used in the Gremlin Console, then this method might be called to determine
if it can be used in a fashion that supports the :remote console
command. By default, this value is
set to false
.
A RemoteAcceptor
should only return true
for this method if it expects that all activities it
supports are executed through the :submit
command. If the users interaction with the remote requires
working with both local and remote evaluation at the same time, it is likely best to keep this method return
false
. A good example of this type of plugin would be the Gephi Plugin which uses :remote config
to configure a local TraversalSource
to be used and expects calls to :submit
for the same body
of analysis.allowRemoteConsole
in interface RemoteAcceptor
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public static String getScript(String submittedScript, GremlinShellEnvironment shell)
Copyright © 2013–2021 Apache Software Foundation. All rights reserved.