Package com.databricks.jdbc.api.impl
Class DatabricksConnectionContext
- java.lang.Object
-
- com.databricks.jdbc.api.impl.DatabricksConnectionContext
-
- All Implemented Interfaces:
IDatabricksConnectionContext
public class DatabricksConnectionContext extends Object implements IDatabricksConnectionContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.databricks.jdbc.api.IDatabricksConnectionContext
IDatabricksConnectionContext.AuthFlow, IDatabricksConnectionContext.AuthMech, IDatabricksConnectionContext.Cloud
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptUndeterminedCertificateRevocation()booleancheckCertificateRevocation()booleanenableTelemetry()booleanequals(Object obj)intgetAsyncExecPollInterval()StringgetAuthEndpoint()Returns the OAuth2 authorization endpoint URL for the authorization code flow.IDatabricksConnectionContext.AuthFlowgetAuthFlow()IDatabricksConnectionContext.AuthMechgetAuthMech()StringgetAuthScope()Returns the OAuth2 authentication scope used in the request.StringgetCatalog()StringgetClientId()StringgetClientSecret()DatabricksClientTypegetClientType()StringgetClientUserAgent()IDatabricksConnectionContext.CloudgetCloud()com.databricks.sdk.core.ProxyConfig.ProxyAuthTypegetCloudFetchProxyAuthType()StringgetCloudFetchProxyHost()StringgetCloudFetchProxyPassword()intgetCloudFetchProxyPort()StringgetCloudFetchProxyUser()intgetCloudFetchThreadPoolSize()Returns the number of threads to be used for fetching data from cloud storageCompressionTypegetCompressionType()IDatabricksComputeResourcegetComputeResource()Returns warehouse-Id as parsed from JDBC connection UrlStringgetConnectionURL()BooleangetDirectResultMode()StringgetEndpointURL()StringgetHostForOAuth()StringgetHostUrl()Returns host-Url for Databricks server as parsed from JDBC connection in formathttps://server:portStringgetHttpPath()intgetIdleHttpConnectionExpiry()StringgetJWTAlgorithm()Returns the algorithm used for signing the JWT (e.g., RS256, ES256).StringgetJWTKeyFile()Returns the file path to the JWT private key used for signing the JWT.StringgetJWTPassphrase()Returns the passphrase to decrypt the private key if the key is encrypted.StringgetKID()Returns the Key ID (KID) used in the JWT header, identifying the key.intgetLogFileCount()intgetLogFileSize()LogLevelgetLogLevel()StringgetLogPathString()StringgetNonProxyHosts()Returns the non-proxy hosts that should be excluded from proxying.StringgetOAuthDiscoveryURL()Returns the discovery URL used to obtain the OAuth2 token and authorization endpoints.StringgetOAuthRefreshToken()Returns the OAuth2 refresh token used to obtain a new access token when the current one expires.List<String>getOAuthScopesForU2M()StringgetPassThroughAccessToken()Returns the pass through access tokencom.databricks.sdk.core.ProxyConfig.ProxyAuthTypegetProxyAuthType()StringgetProxyHost()StringgetProxyPassword()intgetProxyPort()StringgetProxyUser()intgetRateLimitRetryTimeout()StringgetSchema()Map<String,String>getSessionConfigs()StringgetSSLTrustStore()Returns the SSL trust store file path used for SSL connections.StringgetSSLTrustStorePassword()Returns the SSL trust store password of the trust store file.StringgetSSLTrustStoreProvider()Returns the SSL trust store provider of the trust store file.StringgetSSLTrustStoreType()Returns the SSL trust store type of the trust store file.intgetTemporarilyUnavailableRetryTimeout()StringgetToken()Returns the auth token (personal access token)StringgetTokenEndpoint()Returns the OAuth2 token endpoint URL for retrieving tokens.BooleangetUseCloudFetchProxy()BooleangetUseEmptyMetadata()BooleangetUseProxy()BooleangetUseSystemProxy()inthashCode()booleanisAllPurposeCluster()booleanisFakeServiceTest()Returns whether the current test is a fake service test.booleanisOAuthDiscoveryModeEnabled()Returns whether OAuth2 discovery mode is enabled, which fetches endpoints dynamically.BooleanshouldEnableArrow()BooleanshouldRetryRateLimitError()BooleanshouldRetryTemporarilyUnavailableError()booleansupportManyParameters()booleanuseJWTAssertion()Returns whether JWT assertion should be used for OAuth2 authentication.
-
-
-
Method Detail
-
getHostUrl
public String getHostUrl() throws DatabricksParsingException
Description copied from interface:IDatabricksConnectionContextReturns host-Url for Databricks server as parsed from JDBC connection in formathttps://server:port- Specified by:
getHostUrlin interfaceIDatabricksConnectionContext- Returns:
- Databricks host-Url
- Throws:
DatabricksParsingException
-
getComputeResource
public IDatabricksComputeResource getComputeResource()
Description copied from interface:IDatabricksConnectionContextReturns warehouse-Id as parsed from JDBC connection Url- Specified by:
getComputeResourcein interfaceIDatabricksConnectionContext- Returns:
- warehouse-Id
-
getHttpPath
public String getHttpPath()
- Specified by:
getHttpPathin interfaceIDatabricksConnectionContext
-
getHostForOAuth
public String getHostForOAuth()
- Specified by:
getHostForOAuthin interfaceIDatabricksConnectionContext
-
getToken
public String getToken()
Description copied from interface:IDatabricksConnectionContextReturns the auth token (personal access token)- Specified by:
getTokenin interfaceIDatabricksConnectionContext- Returns:
- auth token
-
getPassThroughAccessToken
public String getPassThroughAccessToken()
Description copied from interface:IDatabricksConnectionContextReturns the pass through access token- Specified by:
getPassThroughAccessTokenin interfaceIDatabricksConnectionContext- Returns:
- access token
-
getAsyncExecPollInterval
public int getAsyncExecPollInterval()
- Specified by:
getAsyncExecPollIntervalin interfaceIDatabricksConnectionContext
-
getDirectResultMode
public Boolean getDirectResultMode()
- Specified by:
getDirectResultModein interfaceIDatabricksConnectionContext
-
getCloud
public IDatabricksConnectionContext.Cloud getCloud() throws DatabricksParsingException
- Throws:
DatabricksParsingException
-
getClientId
public String getClientId() throws DatabricksParsingException
- Specified by:
getClientIdin interfaceIDatabricksConnectionContext- Throws:
DatabricksParsingException
-
getOAuthScopesForU2M
public List<String> getOAuthScopesForU2M() throws DatabricksParsingException
- Specified by:
getOAuthScopesForU2Min interfaceIDatabricksConnectionContext- Throws:
DatabricksParsingException
-
getClientSecret
public String getClientSecret()
- Specified by:
getClientSecretin interfaceIDatabricksConnectionContext
-
getAuthFlow
public IDatabricksConnectionContext.AuthFlow getAuthFlow()
- Specified by:
getAuthFlowin interfaceIDatabricksConnectionContext
-
getAuthMech
public IDatabricksConnectionContext.AuthMech getAuthMech()
- Specified by:
getAuthMechin interfaceIDatabricksConnectionContext
-
getLogLevel
public LogLevel getLogLevel()
- Specified by:
getLogLevelin interfaceIDatabricksConnectionContext
-
getLogPathString
public String getLogPathString()
- Specified by:
getLogPathStringin interfaceIDatabricksConnectionContext
-
getLogFileSize
public int getLogFileSize()
- Specified by:
getLogFileSizein interfaceIDatabricksConnectionContext
-
getLogFileCount
public int getLogFileCount()
- Specified by:
getLogFileCountin interfaceIDatabricksConnectionContext
-
getClientUserAgent
public String getClientUserAgent()
- Specified by:
getClientUserAgentin interfaceIDatabricksConnectionContext
-
getCompressionType
public CompressionType getCompressionType()
- Specified by:
getCompressionTypein interfaceIDatabricksConnectionContext
-
getClientType
public DatabricksClientType getClientType()
- Specified by:
getClientTypein interfaceIDatabricksConnectionContext
-
getCloudFetchThreadPoolSize
public int getCloudFetchThreadPoolSize()
Description copied from interface:IDatabricksConnectionContextReturns the number of threads to be used for fetching data from cloud storage- Specified by:
getCloudFetchThreadPoolSizein interfaceIDatabricksConnectionContext
-
getCatalog
public String getCatalog()
- Specified by:
getCatalogin interfaceIDatabricksConnectionContext
-
getSchema
public String getSchema()
- Specified by:
getSchemain interfaceIDatabricksConnectionContext
-
getSessionConfigs
public Map<String,String> getSessionConfigs()
- Specified by:
getSessionConfigsin interfaceIDatabricksConnectionContext
-
isAllPurposeCluster
public boolean isAllPurposeCluster()
- Specified by:
isAllPurposeClusterin interfaceIDatabricksConnectionContext
-
getProxyHost
public String getProxyHost()
- Specified by:
getProxyHostin interfaceIDatabricksConnectionContext
-
getProxyPort
public int getProxyPort()
- Specified by:
getProxyPortin interfaceIDatabricksConnectionContext
-
getProxyUser
public String getProxyUser()
- Specified by:
getProxyUserin interfaceIDatabricksConnectionContext
-
getProxyPassword
public String getProxyPassword()
- Specified by:
getProxyPasswordin interfaceIDatabricksConnectionContext
-
getUseProxy
public Boolean getUseProxy()
- Specified by:
getUseProxyin interfaceIDatabricksConnectionContext
-
getProxyAuthType
public com.databricks.sdk.core.ProxyConfig.ProxyAuthType getProxyAuthType()
- Specified by:
getProxyAuthTypein interfaceIDatabricksConnectionContext
-
getUseSystemProxy
public Boolean getUseSystemProxy()
- Specified by:
getUseSystemProxyin interfaceIDatabricksConnectionContext
-
getUseCloudFetchProxy
public Boolean getUseCloudFetchProxy()
- Specified by:
getUseCloudFetchProxyin interfaceIDatabricksConnectionContext
-
getCloudFetchProxyHost
public String getCloudFetchProxyHost()
- Specified by:
getCloudFetchProxyHostin interfaceIDatabricksConnectionContext
-
getCloudFetchProxyPort
public int getCloudFetchProxyPort()
- Specified by:
getCloudFetchProxyPortin interfaceIDatabricksConnectionContext
-
getCloudFetchProxyUser
public String getCloudFetchProxyUser()
- Specified by:
getCloudFetchProxyUserin interfaceIDatabricksConnectionContext
-
getCloudFetchProxyPassword
public String getCloudFetchProxyPassword()
- Specified by:
getCloudFetchProxyPasswordin interfaceIDatabricksConnectionContext
-
getCloudFetchProxyAuthType
public com.databricks.sdk.core.ProxyConfig.ProxyAuthType getCloudFetchProxyAuthType()
- Specified by:
getCloudFetchProxyAuthTypein interfaceIDatabricksConnectionContext
-
shouldEnableArrow
public Boolean shouldEnableArrow()
- Specified by:
shouldEnableArrowin interfaceIDatabricksConnectionContext
-
getEndpointURL
public String getEndpointURL() throws DatabricksParsingException
- Specified by:
getEndpointURLin interfaceIDatabricksConnectionContext- Throws:
DatabricksParsingException
-
shouldRetryTemporarilyUnavailableError
public Boolean shouldRetryTemporarilyUnavailableError()
- Specified by:
shouldRetryTemporarilyUnavailableErrorin interfaceIDatabricksConnectionContext
-
shouldRetryRateLimitError
public Boolean shouldRetryRateLimitError()
- Specified by:
shouldRetryRateLimitErrorin interfaceIDatabricksConnectionContext
-
getTemporarilyUnavailableRetryTimeout
public int getTemporarilyUnavailableRetryTimeout()
- Specified by:
getTemporarilyUnavailableRetryTimeoutin interfaceIDatabricksConnectionContext
-
getRateLimitRetryTimeout
public int getRateLimitRetryTimeout()
- Specified by:
getRateLimitRetryTimeoutin interfaceIDatabricksConnectionContext
-
getIdleHttpConnectionExpiry
public int getIdleHttpConnectionExpiry()
- Specified by:
getIdleHttpConnectionExpiryin interfaceIDatabricksConnectionContext
-
supportManyParameters
public boolean supportManyParameters()
- Specified by:
supportManyParametersin interfaceIDatabricksConnectionContext
-
isFakeServiceTest
public boolean isFakeServiceTest()
Returns whether the current test is a fake service test.- Specified by:
isFakeServiceTestin interfaceIDatabricksConnectionContext
-
enableTelemetry
public boolean enableTelemetry()
- Specified by:
enableTelemetryin interfaceIDatabricksConnectionContext
-
getConnectionURL
public String getConnectionURL()
- Specified by:
getConnectionURLin interfaceIDatabricksConnectionContext
-
checkCertificateRevocation
public boolean checkCertificateRevocation()
- Specified by:
checkCertificateRevocationin interfaceIDatabricksConnectionContext
-
acceptUndeterminedCertificateRevocation
public boolean acceptUndeterminedCertificateRevocation()
- Specified by:
acceptUndeterminedCertificateRevocationin interfaceIDatabricksConnectionContext
-
getJWTKeyFile
public String getJWTKeyFile()
Description copied from interface:IDatabricksConnectionContextReturns the file path to the JWT private key used for signing the JWT.- Specified by:
getJWTKeyFilein interfaceIDatabricksConnectionContext
-
getKID
public String getKID()
Description copied from interface:IDatabricksConnectionContextReturns the Key ID (KID) used in the JWT header, identifying the key.- Specified by:
getKIDin interfaceIDatabricksConnectionContext
-
getJWTPassphrase
public String getJWTPassphrase()
Description copied from interface:IDatabricksConnectionContextReturns the passphrase to decrypt the private key if the key is encrypted.- Specified by:
getJWTPassphrasein interfaceIDatabricksConnectionContext
-
getJWTAlgorithm
public String getJWTAlgorithm()
Description copied from interface:IDatabricksConnectionContextReturns the algorithm used for signing the JWT (e.g., RS256, ES256).- Specified by:
getJWTAlgorithmin interfaceIDatabricksConnectionContext
-
useJWTAssertion
public boolean useJWTAssertion()
Description copied from interface:IDatabricksConnectionContextReturns whether JWT assertion should be used for OAuth2 authentication.- Specified by:
useJWTAssertionin interfaceIDatabricksConnectionContext
-
getTokenEndpoint
public String getTokenEndpoint()
Description copied from interface:IDatabricksConnectionContextReturns the OAuth2 token endpoint URL for retrieving tokens.- Specified by:
getTokenEndpointin interfaceIDatabricksConnectionContext
-
getAuthEndpoint
public String getAuthEndpoint()
Description copied from interface:IDatabricksConnectionContextReturns the OAuth2 authorization endpoint URL for the authorization code flow.- Specified by:
getAuthEndpointin interfaceIDatabricksConnectionContext
-
isOAuthDiscoveryModeEnabled
public boolean isOAuthDiscoveryModeEnabled()
Description copied from interface:IDatabricksConnectionContextReturns whether OAuth2 discovery mode is enabled, which fetches endpoints dynamically.- Specified by:
isOAuthDiscoveryModeEnabledin interfaceIDatabricksConnectionContext
-
getOAuthDiscoveryURL
public String getOAuthDiscoveryURL()
Description copied from interface:IDatabricksConnectionContextReturns the discovery URL used to obtain the OAuth2 token and authorization endpoints.- Specified by:
getOAuthDiscoveryURLin interfaceIDatabricksConnectionContext
-
getAuthScope
public String getAuthScope()
Description copied from interface:IDatabricksConnectionContextReturns the OAuth2 authentication scope used in the request.- Specified by:
getAuthScopein interfaceIDatabricksConnectionContext
-
getOAuthRefreshToken
public String getOAuthRefreshToken()
Description copied from interface:IDatabricksConnectionContextReturns the OAuth2 refresh token used to obtain a new access token when the current one expires.- Specified by:
getOAuthRefreshTokenin interfaceIDatabricksConnectionContext
-
getUseEmptyMetadata
public Boolean getUseEmptyMetadata()
- Specified by:
getUseEmptyMetadatain interfaceIDatabricksConnectionContext
-
getNonProxyHosts
public String getNonProxyHosts()
Description copied from interface:IDatabricksConnectionContextReturns the non-proxy hosts that should be excluded from proxying.- Specified by:
getNonProxyHostsin interfaceIDatabricksConnectionContext
-
getSSLTrustStore
public String getSSLTrustStore()
Description copied from interface:IDatabricksConnectionContextReturns the SSL trust store file path used for SSL connections.- Specified by:
getSSLTrustStorein interfaceIDatabricksConnectionContext
-
getSSLTrustStoreProvider
public String getSSLTrustStoreProvider()
Description copied from interface:IDatabricksConnectionContextReturns the SSL trust store provider of the trust store file.- Specified by:
getSSLTrustStoreProviderin interfaceIDatabricksConnectionContext
-
getSSLTrustStorePassword
public String getSSLTrustStorePassword()
Description copied from interface:IDatabricksConnectionContextReturns the SSL trust store password of the trust store file.- Specified by:
getSSLTrustStorePasswordin interfaceIDatabricksConnectionContext
-
getSSLTrustStoreType
public String getSSLTrustStoreType()
Description copied from interface:IDatabricksConnectionContextReturns the SSL trust store type of the trust store file.- Specified by:
getSSLTrustStoreTypein interfaceIDatabricksConnectionContext
-
-