public final class Pgx
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DIST_URL |
static java.lang.String |
EMBEDDED_URL
constant indicating this URL refers to an embedded PGX instance.
|
| Constructor and Description |
|---|
Pgx() |
| Modifier and Type | Method and Description |
|---|---|
static PgxSession |
createSession(java.lang.String source)
Creates a session on the default instance.
|
static PgxSession |
createSession(java.lang.String baseUrl,
java.lang.String source)
Creates a session.
|
static java.lang.String |
getDefaultUrl()
The default url is set by default to
EMBEDDED_URL. |
static ServerInstance |
getInstance()
Get a handle to a PGX instance using
getDefaultUrl(). |
static ServerInstance |
getInstance(ClientConfig config)
Get a handle to a PGX instance.
|
static ServerInstance |
getInstance(ClientConfig config,
oracle.pgx.realm.client.RealmClient realmClient)
Get a handle to a PGX instance.
|
static ServerInstance |
getInstance(java.lang.String baseUrl)
Get a handle to a PGX instance.
|
static ServerInstance |
getInstance(java.lang.String baseUrl,
oracle.pgx.realm.client.RealmClient realmClient)
Get a handle to a PGX instance, using a
RealmClient that provides authentication
tokens |
static ServerInstance |
getInstance(java.lang.String baseUrl,
java.lang.String token)
Get a handle to a PGX instance, providing the token for authentication.
|
static oracle.pgx.api.internal.ApiProvider |
getProviderFor(java.lang.String url) |
static void |
setDefaultUrl(java.lang.String url)
set the default base url used by invocations of
getInstance(). |
public static final java.lang.String DIST_URL
public static final java.lang.String EMBEDDED_URL
public static PgxSession createSession(java.lang.String source) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
createSession(String, * String)
using getDefaultUrl() as base URL.source - the session source stringjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic static PgxSession createSession(java.lang.String baseUrl, java.lang.String source) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
baseUrl - the base URL pointing to a PGX server instance the session should be created onsource - the session source stringjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic static java.lang.String getDefaultUrl()
EMBEDDED_URL. You can overwrite the *default* default url by setting
the -DpgxDefaultUrl system property.public static ServerInstance getInstance() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
getDefaultUrl().ServerInstance instancejava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic static ServerInstance getInstance(ClientConfig config)
config - the config identifying the instanceServerInstance instancepublic static ServerInstance getInstance(ClientConfig config, oracle.pgx.realm.client.RealmClient realmClient)
config - the config identifying the instancerealmClient - a RealmClient to provide authentication tokensServerInstance instancepublic static ServerInstance getInstance(java.lang.String baseUrl)
baseUrl - base url pointing to a PGX server instance, e.g. myhost:7000/pgxServerInstance instancepublic static ServerInstance getInstance(java.lang.String baseUrl, oracle.pgx.realm.client.RealmClient realmClient)
RealmClient that provides authentication
tokensbaseUrl - base url pointing to a PGX server instance, e.g. myhost:7000/pgxrealmClient - a RealmClient to provide authentication tokensServerInstance instancepublic static ServerInstance getInstance(java.lang.String baseUrl, java.lang.String token)
baseUrl - base url pointing to a PGX server instance, e.g. myhost:7000/pgxtoken - an authentication tokenServerInstance instancepublic static oracle.pgx.api.internal.ApiProvider getProviderFor(java.lang.String url)
public static void setDefaultUrl(java.lang.String url)
getInstance(). The new default url affects sub-sequent
calls
of getInstance().url - default url