Interface ClientInfo
- All Superinterfaces:
ClientService
,Serializable
The ClientInfo service provides basic information about the client device.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the preferred locale of the client, based on the Accept-Language HTTP header of the first client request.Locale[]
Returns the locales accepted by the client, based on the Accept-Language HTTP header.int
Returns the offset between the client's local time and UTC.
-
Method Details
-
getTimezoneOffset
int getTimezoneOffset()Returns the offset between the client's local time and UTC.- Returns:
- the offset in minutes
-
getLocale
Locale getLocale()Returns the preferred locale of the client, based on the Accept-Language HTTP header of the first client request. If the client does not provide this information, this method returnsnull
.- Returns:
- the client locale, or
null
-
getLocales
Locale[] getLocales()Returns the locales accepted by the client, based on the Accept-Language HTTP header. The locales are ordered by preference, beginning with the preferred locale. If the client does not provide this information, this method returns an empty array.- Returns:
- an array containing the client locales, may be empty, but never
null
-