Package com.databricks.jdbc.common.util

## Class UserAgentManager

- java.lang.Object
- - com.databricks.jdbc.common.util.UserAgentManager

    public class UserAgentManager
    extends Object

### Field Summary

Fields
`static String` `USER_AGENT_SEA_CLIENT`
`static String` `USER_AGENT_THRIFT_CLIENT`

### Constructor Summary

Constructors
`UserAgentManager()`

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `getUserAgentString()` Gets the user agent string for Databricks Driver HTTP Client.
`static void` `setUserAgent​(IDatabricksConnectionContext connectionContext)` Set the user agent for the Databricks JDBC driver.
`static void` `updateUserAgentAndTelemetry​(IDatabricksConnectionContext connectionContext, String clientInfoAppName)` Updates both the telemetry client app name and HTTP user agent headers.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### USER_AGENT_SEA_CLIENT

    public static final String USER_AGENT_SEA_CLIENT

See Also:
  Constant Field Values

#### USER_AGENT_THRIFT_CLIENT

    public static final String USER_AGENT_THRIFT_CLIENT

See Also:
  Constant Field Values

### 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.