Package com.azure.core.util
Class UserAgentUtil
- java.lang.Object
-
- com.azure.core.util.UserAgentUtil
-
public final class UserAgentUtil extends Object
Utility for building user agent string for Azure client libraries as specified in the design guidelines.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_USER_AGENT_HEADER
DefaultUserAgent
header.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
toUserAgentString(String applicationId, String sdkName, String sdkVersion, Configuration configuration)
Return user agent string for the given sdk name and version.
-
-
-
Field Detail
-
DEFAULT_USER_AGENT_HEADER
public static final String DEFAULT_USER_AGENT_HEADER
DefaultUserAgent
header.- See Also:
- Constant Field Values
-
-
Method Detail
-
toUserAgentString
public static String toUserAgentString(String applicationId, String sdkName, String sdkVersion, Configuration configuration)
Return user agent string for the given sdk name and version.- Parameters:
applicationId
- Name of the application.sdkName
- Name of the SDK.sdkVersion
- Version of the SDK.configuration
- The configuration to use to determine if platform info should be included in the user agent string.- Returns:
- User agent string as specified in design guidelines.
- Throws:
IllegalArgumentException
- IfapplicationId
contains spaces or is larger than 24 characters in length.
-
-