public class LiteDeviceResolver extends Object implements DeviceResolver
Constructor and Description |
---|
LiteDeviceResolver() |
LiteDeviceResolver(List<String> normalUserAgentKeywords) |
Modifier and Type | Method and Description |
---|---|
protected List<String> |
getMobileUserAgentKeywords()
List of user agent keywords that identify mobile devices.
|
protected List<String> |
getMobileUserAgentPrefixes()
List of user agent prefixes that identify mobile devices.
|
protected List<String> |
getNormalUserAgentKeywords()
List of user agent keywords that identify normal devices.
|
protected List<String> |
getTabletUserAgentKeywords()
List of user agent keywords that identify tablet devices.
|
protected void |
init()
Initialize this device resolver implementation.
|
Device |
resolveDevice(HttpServletRequest request)
Resolve the device that originated the web request.
|
protected Device |
resolveFallback(HttpServletRequest request)
Fallback called if no mobile device is matched by this resolver.
|
public Device resolveDevice(HttpServletRequest request)
DeviceResolver
resolveDevice
in interface DeviceResolver
protected List<String> getMobileUserAgentPrefixes()
protected List<String> getMobileUserAgentKeywords()
protected List<String> getTabletUserAgentKeywords()
protected List<String> getNormalUserAgentKeywords()
protected void init()
protected Device resolveFallback(HttpServletRequest request)
Device
that is neither
mobile or a tablet. Subclasses may override to try additional mobile or tablet
device matching before falling back to a "normal" device.