Package com.Lomikel.Januser
Class StringGremlinClient
- java.lang.Object
-
- com.Lomikel.Januser.GremlinClient
-
- com.Lomikel.Januser.StringGremlinClient
-
public class StringGremlinClient extends GremlinClient
StringGremlinClient
provides connection to Gremlin Graph passing Gremlin commands as Strings.- Author:
- J.Hrivnac
-
-
Constructor Summary
Constructors Constructor Description StringGremlinClient(java.lang.String hostname, int port)
Create with connection parameters, using GraphBinary serializer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close client.void
connect()
Connect client.java.util.List<Result>
interpret(java.lang.String request)
Interpret Gremlin String.java.lang.String
interpret2JSON(java.lang.String request)
Interpret Gremlin request as JSON string .void
open(java.lang.String hostname, int port)
Open with GraphSON serializer.-
Methods inherited from class com.Lomikel.Januser.GremlinClient
cluster, createCluster
-
-
-
-
Constructor Detail
-
StringGremlinClient
public StringGremlinClient(java.lang.String hostname, int port)
Create with connection parameters, using GraphBinary serializer.- Parameters:
hostname
- The Gremlin hostname.table
- The Gremlin port.
-
-
Method Detail
-
open
public void open(java.lang.String hostname, int port)
Open with GraphSON serializer.- Specified by:
open
in classGremlinClient
- Parameters:
hostname
- The Gremlin hostname.table
- The Gremlin port.
-
connect
public void connect()
Description copied from class:GremlinClient
Connect client.- Specified by:
connect
in classGremlinClient
-
close
public void close()
Description copied from class:GremlinClient
Close client.- Specified by:
close
in classGremlinClient
-
interpret
public java.util.List<Result> interpret(java.lang.String request) throws java.lang.Exception
Interpret Gremlin String.- Parameters:
request
- The Gremlin regurest string.- Returns:
- The
List
ofResult
s. - Throws:
java.lang.Exception
- If anything goes wrong.
-
interpret2JSON
public java.lang.String interpret2JSON(java.lang.String request) throws java.lang.Exception
Interpret Gremlin request as JSON string .- Parameters:
request
- The Gremlin reguest string.- Returns:
- The
Result
s as JSON string . - Throws:
java.lang.Exception
- If anything goes wrong.
-
-