Class GraphServer


  • public class GraphServer
    extends java.lang.Object
    Allows to connect to a graph server
    • Field Detail

      • DEFAULT_TIME_BEFORE_EXPIRY

        public static final int DEFAULT_TIME_BEFORE_EXPIRY
        See Also:
        Constant Field Values
      • PRODUCT_DISTRIBUTION_KEY

        public static final java.lang.String PRODUCT_DISTRIBUTION_KEY
        See Also:
        Constant Field Values
      • SOMBRERO_VERSION_KEY

        public static final java.lang.String SOMBRERO_VERSION_KEY
        See Also:
        Constant Field Values
    • Method Detail

      • getEmbeddedInstance

        public static ServerInstance getEmbeddedInstance()
        Connects to an embedded graph server. An embedded graph server runs inside the client JVM.
        Returns:
        a handle to the embedded graph server
      • getInstance

        public static ServerInstance getInstance​(ClientConfig clientConfig,
                                                 java.lang.String username,
                                                 char[] password)
                                          throws java.io.IOException
        Connects to a remote graph server
        Parameters:
        clientConfig - the client configuration. ACCESS_TOKEN field will be set/overwritten by this function.
        username - the Database username to use for authentication
        password - the Database password to use for authentication
        Returns:
        a handle to the remote server
        Throws:
        java.io.IOException - if any unexpected network exception occurred
      • getInstance

        public static ServerInstance getInstance​(java.lang.String baseUrl,
                                                 java.lang.String username,
                                                 char[] password)
                                          throws java.io.IOException
        Connects to a remote graph server
        Parameters:
        baseUrl - the base URL of the remote graph server
        username - the Database username to use for authentication
        password - the Database password to use for authentication
        Returns:
        a handle to the remote server
        Throws:
        java.io.IOException - if any unexpected network exception occurred
      • getInstance

        public static ServerInstance getInstance​(java.lang.String baseUrl,
                                                 java.lang.String kerberosTicketPath)
                                          throws java.io.IOException
        Connects to a remote graph server
        Parameters:
        baseUrl - the base URL of the remote graph server
        kerberosTicketPath - the kerberos ticket to be use for authentication
        Returns:
        a handle to the remote server
        Throws:
        java.io.IOException - if any unexpected network exception occurred
      • reauthenticate

        public static ServerInstance reauthenticate​(ServerInstance instance,
                                                    java.lang.String username,
                                                    char[] password)
                                             throws java.io.IOException
        Re-authenticates an existing ServerInstance object with a remote server
        Parameters:
        instance - the ServerInstance object to re-authenticate
        username - the username to use for re-authentication
        password - the password to use for re-authentication
        Returns:
        the given ServerInstance object
        Throws:
        java.io.IOException - if any unexpected network exception occurred
      • generateToken

        public static oracle.pg.rdbms.internal.onprem.TokenResponse generateToken​(java.lang.String baseUrl,
                                                                                  java.lang.String username,
                                                                                  char[] password)
                                                                           throws java.io.IOException
        Generates a new authentication token
        Parameters:
        baseUrl - the base URL of the remote graph server
        username - the Database username to use for authentication
        password - the Database password to use for authentication
        Returns:
        the newly generated authentication token
        Throws:
        java.io.IOException
      • generateToken

        public static oracle.pg.rdbms.internal.onprem.TokenResponse generateToken​(java.lang.String baseUrl,
                                                                                  java.lang.String kerberosTicketPath)
                                                                           throws java.io.IOException
        Generates a new authentication token
        Parameters:
        baseUrl - the base URL of the remote graph server
        kerberosTicketPath - the kerberos ticket to be use for authentication
        Returns:
        the newly generated authentication token
        Throws:
        java.io.IOException
      • getProductVersion

        public static java.util.Properties getProductVersion()