Package com.firebolt.jdbc.client
Class FireboltClient
java.lang.Object
com.firebolt.jdbc.client.FireboltClient
- All Implemented Interfaces:
CacheListener,EventListener
- Direct Known Subclasses:
FireboltAccountClient,FireboltAccountRetriever,FireboltAuthenticationClient,StatementClientImpl
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFireboltClient(okhttp3.OkHttpClient httpClient, FireboltConnection connection, String customDrivers, String customClients) -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()protected okhttp3.RequestcreatePostRequest(String uri, String label, String json, String accessToken) protected okhttp3.RequestcreatePostRequest(String uri, String label, okhttp3.RequestBody body, String accessToken) protected okhttp3.Responseprotected okhttp3.Responseprotected <T> TgetResource(String uri, String accessToken, Class<T> valueType) protected <T> TgetResource(String uri, String host, String accessToken, Class<T> valueType) protected StringgetResponseAsString(okhttp3.Response response) protected booleanisCallSuccessful(int statusCode) protected <T> TjsonToObject(String json, Class<T> valueType) protected voidvalidateResponse(String host, int statusCode, String errorMessageFromServer) protected voidvalidateResponse(String host, okhttp3.Response response, Boolean isCompress)
-
Field Details
-
connection
-
-
Constructor Details
-
FireboltClient
protected FireboltClient(okhttp3.OkHttpClient httpClient, FireboltConnection connection, String customDrivers, String customClients)
-
-
Method Details
-
getResource
protected <T> T getResource(String uri, String accessToken, Class<T> valueType) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
getResource
protected <T> T getResource(String uri, String host, String accessToken, Class<T> valueType) throws SQLException, IOException - Throws:
SQLExceptionIOException
-
jsonToObject
- Throws:
IOException
-
execute
protected okhttp3.Response execute(@NonNull @NonNull okhttp3.Request request, String host) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
execute
protected okhttp3.Response execute(@NonNull @NonNull okhttp3.Request request, String host, boolean isCompress) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
createPostRequest
-
createPostRequest
-
validateResponse
protected void validateResponse(String host, okhttp3.Response response, Boolean isCompress) throws SQLException - Throws:
SQLException
-
validateResponse
protected void validateResponse(String host, int statusCode, String errorMessageFromServer) throws SQLException - Throws:
SQLException
-
getResponseAsString
- Throws:
SQLExceptionIOException
-
isCallSuccessful
protected boolean isCallSuccessful(int statusCode) -
cleanup
public void cleanup()- Specified by:
cleanupin interfaceCacheListener
-