public class UserAgent
extends java.lang.Object
Represents the usr agent of the DataGate client.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
USER_AGENT
The constant USER_AGENT.
|
Constructor and Description |
---|
UserAgent() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAppName()
The application name.
|
java.lang.String |
getAppVersion()
The application version.
|
java.lang.String |
getClientId()
The client id
|
java.lang.String |
getDevice()
The device name.
|
static UserAgent |
parse(java.lang.String userAgentString)
Parse a user agent string.
|
void |
setAppName(java.lang.String appName)
The application name.
|
void |
setAppVersion(java.lang.String appVersion)
The application version.
|
void |
setClientId(java.lang.String clientId)
The client id
|
void |
setDevice(java.lang.String device)
The device name.
|
java.lang.String |
toString() |
public static final java.lang.String USER_AGENT
The constant USER_AGENT.
public static UserAgent parse(java.lang.String userAgentString)
Parse a user agent string.
userAgentString
- the user agent stringUserAgent
object parsed from the string.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getAppName()
The application name.
public java.lang.String getAppVersion()
The application version.
public java.lang.String getDevice()
The device name.
public java.lang.String getClientId()
The client id
public void setAppName(java.lang.String appName)
The application name.
appName
- the application namepublic void setAppVersion(java.lang.String appVersion)
The application version.
appName
- the application versionpublic void setDevice(java.lang.String device)
The device name.
device
- the device namepublic void setClientId(java.lang.String clientId)
The client id
clientId
- the client id