Search in sources :

Example 1 with Console

use of org.apache.tinkerpop.gremlin.console.Console in project cypher-for-gremlin by opencypher.

the class EmbeddedGremlinConsole method start.

public void start() {
    System.setProperty("plugins", "v3d3");
    PipedInputStream in = new PipedInputStream();
    replaceSystemIn(in);
    try {
        input = new PrintWriter(new PipedOutputStream(in));
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
    console = new Thread(() -> new Console(new IO(), new ArrayList<>(), true));
    console.start();
}
Also used : IO(org.codehaus.groovy.tools.shell.IO) Console(org.apache.tinkerpop.gremlin.console.Console) PipedOutputStream(java.io.PipedOutputStream) PipedInputStream(java.io.PipedInputStream) IOException(java.io.IOException) PrintWriter(java.io.PrintWriter)

Aggregations

IOException (java.io.IOException)1 PipedInputStream (java.io.PipedInputStream)1 PipedOutputStream (java.io.PipedOutputStream)1 PrintWriter (java.io.PrintWriter)1 Console (org.apache.tinkerpop.gremlin.console.Console)1 IO (org.codehaus.groovy.tools.shell.IO)1