public class GraphServer
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
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(ClientConfig clientConfig, java.lang.String username, char[] password)
Connects to a remote graph server
|
static ServerInstance |
getInstance(ClientConfig clientConfig, java.lang.String username, char[] password, int refreshTimeBeforeTokenExpiry)
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(java.lang.String baseUrl, java.lang.String username, char[] password, int refreshTimeBeforeTokenExpiry)
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
|
public static java.lang.String generateToken(java.lang.String baseUrl, java.lang.String username, char[] password) throws java.io.IOException
baseUrl
- the base URL of the remote graph serverusername
- the Database username to use for authenticationpassword
- the Database password to use for authenticationjava.io.IOException
public static ServerInstance getEmbeddedInstance()
public static ServerInstance getInstance(ClientConfig clientConfig, java.lang.String username, char[] password) throws java.io.IOException
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 authenticationjava.io.IOException
- if any unexpected network exception occurredpublic static ServerInstance getInstance(ClientConfig clientConfig, java.lang.String username, char[] password, int refreshTimeBeforeTokenExpiry) throws java.io.IOException
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 authenticationrefreshTimeBeforeTokenExpiry
- the time in seconds to refresh the token automatically before expiresjava.io.IOException
- if any unexpected network exception occurredpublic static ServerInstance getInstance(java.lang.String baseUrl, java.lang.String username, char[] password) throws java.io.IOException
baseUrl
- the base URL of the remote graph serverusername
- the Database username to use for authenticationpassword
- the Database password to use for authenticationjava.io.IOException
- if any unexpected network exception occurredpublic static ServerInstance getInstance(java.lang.String baseUrl, java.lang.String username, char[] password, int refreshTimeBeforeTokenExpiry) throws java.io.IOException
baseUrl
- the base URL of the remote graph serverusername
- the Database username to use for authenticationpassword
- the Database password to use for authenticationrefreshTimeBeforeTokenExpiry
- the time in seconds to refresh the token automatically before expiresjava.io.IOException
- if any unexpected network exception occurredpublic static ServerInstance reauthenticate(ServerInstance instance, java.lang.String username, char[] password) throws java.io.IOException
instance
- the ServerInstance object to re-authenticateusername
- the username to use for re-authenticationpassword
- the password to use for re-authenticationjava.io.IOException
- if any unexpected network exception occurred