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` `buildUserAgentForConnectorService​(IDatabricksConnectionContext connectionContext)` Build user agent string for connector service requests (without client type to avoid circular dependency).
`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.

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

#### buildUserAgentForConnectorService

    public static String buildUserAgentForConnectorService​(IDatabricksConnectionContext connectionContext)

Build user agent string for connector service requests (without client type to avoid circular dependency). This is used specifically for feature flags requests since client type is not yet determined.

Parameters:
  `connectionContext` - The connection context.
Returns:
  User agent string with format: "DatabricksJDBCDriverOSS/version databricks-jdbc-http jvm/version os/name [CustomApp/version]"

#### getUserAgentString

    public static String getUserAgentString()

Gets the user agent string for Databricks Driver HTTP Client.