Class UserAgentManager


  • public class UserAgentManager
    extends Object
    • Constructor Detail

      • UserAgentManager

        public UserAgentManager()
    • Method Detail

      • setUserAgent

        public static void setUserAgent​(IDatabricksConnectionContext connectionContext)
        Set the user agent for the Databricks JDBC driver.
        Parameters:
        connectionContext - The connection context.
      • updateUserAgentAndTelemetry

        public static void updateUserAgentAndTelemetry​(IDatabricksConnectionContext connectionContext,
                                                       String clientInfoAppName)
        Updates both the telemetry client app name and HTTP user agent headers. To be called during connection initialization and when app name changes.
        Parameters:
        connectionContext - The connection context
        clientInfoAppName - Optional client info app name, can be null
      • getUserAgentString

        public static String getUserAgentString()
        Gets the user agent string for Databricks Driver HTTP Client.