Class StringGremlinClient

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Client _client  
      private org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper _mapper  
      private static org.apache.logging.log4j.Logger log
      Logging .
    • 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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _mapper

        private org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper _mapper
      • log

        private static org.apache.logging.log4j.Logger log
        Logging .
    • 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 class GremlinClient
        Parameters:
        hostname - The Gremlin hostname.
        table - The Gremlin port.
      • interpret

        public java.util.List<Resultinterpret​(java.lang.String request)
                                         throws java.lang.Exception
        Interpret Gremlin String.
        Parameters:
        request - The Gremlin regurest string.
        Returns:
        The List of Results.
        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 Results as JSON string .
        Throws:
        java.lang.Exception - If anything goes wrong.