Package com.firebolt.jdbc.client.account
Class FireboltAccountClient
java.lang.Object
com.firebolt.jdbc.client.FireboltClient
com.firebolt.jdbc.client.account.FireboltAccountClient
- All Implemented Interfaces:
CacheListener
,EventListener
-
Field Summary
Fields inherited from class com.firebolt.jdbc.client.FireboltClient
connection
-
Constructor Summary
ConstructorDescriptionFireboltAccountClient
(okhttp3.OkHttpClient httpClient, FireboltConnection fireboltConnection, String customDrivers, String customClients) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
getAccount
(String host, String account, String accessToken) Returns the accountgetDefaultEngineByDatabaseName
(String host, String accountId, String dbName, String accessToken) Returns the default engine of the databaseReturns an enginegetEngineId
(String host, String accountId, String engineName, String accessToken) Returns the engine idMethods inherited from class com.firebolt.jdbc.client.FireboltClient
createPostRequest, createPostRequest, execute, execute, getResource, getResource, getResponseAsString, isCallSuccessful, jsonToObject, validateResponse, validateResponse
-
Constructor Details
-
FireboltAccountClient
public FireboltAccountClient(okhttp3.OkHttpClient httpClient, FireboltConnection fireboltConnection, String customDrivers, String customClients)
-
-
Method Details
-
getAccount
public FireboltAccountResponse getAccount(String host, String account, String accessToken) throws SQLException, IOException Returns the account- Parameters:
host
- the hostaccount
- the name of the accountaccessToken
- the access token- Returns:
- the account
- Throws:
SQLException
IOException
-
getEngine
public FireboltEngineResponse getEngine(String host, String accountId, String engineName, String engineId, String accessToken) throws SQLException, IOException Returns an engine- Parameters:
host
- the hostaccountId
- the id of the accountengineName
- the engine nameengineId
- the engine idaccessToken
- the access token- Returns:
- the engine
- Throws:
SQLException
IOException
-
getDefaultEngineByDatabaseName
public FireboltDefaultDatabaseEngineResponse getDefaultEngineByDatabaseName(String host, String accountId, String dbName, String accessToken) throws SQLException, IOException Returns the default engine of the database- Parameters:
host
- the hostaccountId
- the account iddbName
- the name of the databaseaccessToken
- the access token- Returns:
- the default engine for the database
- Throws:
SQLException
IOException
-
getEngineId
public FireboltEngineIdResponse getEngineId(String host, String accountId, String engineName, String accessToken) throws SQLException, IOException Returns the engine id- Parameters:
host
- the hostaccountId
- the account idengineName
- the name of the engineaccessToken
- the access token- Returns:
- the engine id
- Throws:
SQLException
IOException
-
cleanup
public void cleanup()- Specified by:
cleanup
in interfaceCacheListener
- Overrides:
cleanup
in classFireboltClient
-