Package oracle.pg.rdbms
Class GraphServer
- java.lang.Object
-
- oracle.pg.rdbms.GraphServer
-
public class GraphServer extends java.lang.Object
Allows to connect to a graph server
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_TIME_BEFORE_EXPIRY
static java.lang.String
PRODUCT_DISTRIBUTION_KEY
static java.lang.String
SOMBRERO_VERSION_KEY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ServerInstance
addVersionInfo(ServerInstance instance)
static oracle.pg.rdbms.internal.onprem.TokenResponse
generateToken(java.lang.String baseUrl, java.lang.String kerberosTicketPath)
Generates a new authentication tokenstatic oracle.pg.rdbms.internal.onprem.TokenResponse
generateToken(java.lang.String baseUrl, java.lang.String username, char[] password)
Generates a new authentication tokenstatic ServerInstance
getEmbeddedInstance()
Connects to an embedded graph server.static ServerInstance
getInstance(java.lang.String baseUrl, java.lang.String kerberosTicketPath)
Connects to a remote graph serverstatic ServerInstance
getInstance(java.lang.String baseUrl, java.lang.String username, char[] password)
Connects to a remote graph serverstatic ServerInstance
getInstance(ClientConfig clientConfig, java.lang.String username, char[] password)
Connects to a remote graph serverstatic java.util.Properties
getProductVersion()
static ServerInstance
reauthenticate(ServerInstance instance, java.lang.String username, char[] password)
Re-authenticates an existing ServerInstance object with a remote 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 authenticationpassword
- 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 serverusername
- the Database username to use for authenticationpassword
- 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 serverkerberosTicketPath
- 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-authenticateusername
- the username to use for re-authenticationpassword
- 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 serverusername
- the Database username to use for authenticationpassword
- 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 serverkerberosTicketPath
- the kerberos ticket to be use for authentication- Returns:
- the newly generated authentication token
- Throws:
java.io.IOException
-
addVersionInfo
public static ServerInstance addVersionInfo(ServerInstance instance)
-
getProductVersion
public static java.util.Properties getProductVersion()
-
-