You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/03/03 20:08:47 UTC

[34/46] tinkerpop git commit: TINKERPOP-1612 Re-wrote RemoteAcceptor stuff for revised model.

TINKERPOP-1612 Re-wrote RemoteAcceptor stuff for revised model.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9b87acdb
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9b87acdb
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9b87acdb

Branch: refs/heads/master
Commit: 9b87acdbcc392e1fbb366eaf251616616594c59e
Parents: 2f0b850
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Feb 27 18:51:34 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Mar 1 16:06:16 2017 -0500

----------------------------------------------------------------------
 docs/src/dev/provider/index.asciidoc                   | 13 ++++++-------
 .../gremlin/console/jsr223/DriverGremlinPlugin.java    |  3 ++-
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9b87acdb/docs/src/dev/provider/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 868a6fa..2dd0843 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -1205,12 +1205,11 @@ find it.
 
 [source,java]
 ----
-include::{basedir}/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/plugin/RemoteAcceptor.java[]
+include::{basedir}/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/console/RemoteAcceptor.java[]
 ----
 
-The `RemoteAcceptor` implementation ties to a `GremlinPlugin` and will only be executed when in use with the Gremlin
-Console plugin host.  Simply instantiate and return a `RemoteAcceptor` in the `GremlinPlugin.remoteAcceptor()` method
-of the plugin implementation.  Generally speaking, each call to `remoteAcceptor()` should produce a new instance of
-a `RemoteAcceptor`.  It will likely be necessary that you provide context from the `GremlinPlugin` to the
-`RemoteAcceptor` plugin.  For example, the `RemoteAcceptor` implementation might require an instance of `Groovysh`
-to provide a way to dynamically evaluate a script provided to it so that it can process the results in a different way.
+The `RemoteAcceptor` can be bound to a `GremlinPlugin` by adding a `ConsoleCustomizer` implementation to the list of
+`Customizer` instances that are returned from the `GremlinPlugin`. The `ConsoleCustomizer` will only be executed when
+in use with the Gremlin Console plugin host.  Simply instantiate and return a `RemoteAcceptor` in the
+`ConsoleCustomizer.getRemoteAcceptor(GremlinShellEnvironment)` method.  Generally speaking, each call to
+`getRemoteAcceptor(GremlinShellEnvironment)` should produce a new instance of a `RemoteAcceptor`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9b87acdb/gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/jsr223/DriverGremlinPlugin.java
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/jsr223/DriverGremlinPlugin.java b/gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/jsr223/DriverGremlinPlugin.java
index fb78ee9..a47700d 100644
--- a/gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/jsr223/DriverGremlinPlugin.java
+++ b/gremlin-console/src/main/java/org/apache/tinkerpop/gremlin/console/jsr223/DriverGremlinPlugin.java
@@ -52,6 +52,7 @@ import org.apache.tinkerpop.gremlin.jsr223.DefaultImportCustomizer;
 import org.apache.tinkerpop.gremlin.jsr223.ImportCustomizer;
 import org.apache.tinkerpop.gremlin.jsr223.console.ConsoleCustomizer;
 import org.apache.tinkerpop.gremlin.jsr223.console.GremlinShellEnvironment;
+import org.apache.tinkerpop.gremlin.jsr223.console.RemoteAcceptor;
 
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -97,7 +98,7 @@ public class DriverGremlinPlugin extends AbstractGremlinPlugin {
 
     private static class DriverConsoleCustomizer implements ConsoleCustomizer {
         @Override
-        public org.apache.tinkerpop.gremlin.jsr223.console.RemoteAcceptor getRemoteAcceptor(final GremlinShellEnvironment environment) {
+        public RemoteAcceptor getRemoteAcceptor(final GremlinShellEnvironment environment) {
             return new DriverRemoteAcceptor(environment);
         }
     }