Class GraphServer


  • public class GraphServer
    extends java.lang.Object
    Allows to connect to a graph server
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static oracle.pg.rdbms.internal.onprem.TokenResponse generateToken​(java.lang.String baseUrl, java.lang.String kerberosTicketPath)
      Generates a new authentication token
      static oracle.pg.rdbms.internal.onprem.TokenResponse generateToken​(java.lang.String baseUrl, java.lang.String username, char[] password)
      Generates a new authentication token
      static ServerInstance getEmbeddedInstance()
      Connects to an embedded graph server.
      static ServerInstance getInstance​(java.lang.String baseUrl, java.lang.String kerberosTicketPath)
      Connects to a remote graph server
      static ServerInstance getInstance​(java.lang.String baseUrl, java.lang.String username, char[] password)
      Connects to a remote graph server
      static ServerInstance getInstance​(ClientConfig clientConfig, java.lang.String username, char[] password)
      Connects to a remote graph server
      static ServerInstance reauthenticate​(ServerInstance instance, java.lang.String username, char[] password)
      Re-authenticates an existing ServerInstance object with a remote server
      • Methods inherited from class java.lang.Object

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

      • DEFAULT_TIME_BEFORE_EXPIRY

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

        public static final int NON_CUSTOM_VALUE_FROM_USER
        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