net.sourceforge.wurfl.core
Class DefaultWURFLManager

java.lang.Object
  extended by net.sourceforge.wurfl.core.DefaultWURFLManager
All Implemented Interfaces:
WURFLManager

public class DefaultWURFLManager
extends Object
implements WURFLManager

This is the default WURFLManager implementation.

Version:
$Id: DefaultWURFLManager.java 432 2010-05-06 12:12:53Z filippo.deluca $
Author:
Fantayeneh Asres Gizaw, Filippo De Luca

Constructor Summary
DefaultWURFLManager(WURFLService service)
          This constructor build a WURFLManagerImpl from a WURFLService instance using DefaultWURFLRequestFactory as WURFLRequestFactory.
DefaultWURFLManager(WURFLService service, WURFLRequestFactory requestFactory)
          This constructor build a WURFLManagerImpl from a WURFLService instance and WURFLRequestFactory instance.
 
Method Summary
 Device getDeviceForRequest(javax.servlet.http.HttpServletRequest request)
          Return a Device instance from HttpServletRequest instance.
 Device getDeviceForRequest(String userAgent)
          Return a Device instance from user-agent String.
 Device getDeviceForRequest(WURFLRequest request)
          Return a Device instance from WURFLRequest instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWURFLManager

public DefaultWURFLManager(WURFLService service,
                           WURFLRequestFactory requestFactory)
This constructor build a WURFLManagerImpl from a WURFLService instance and WURFLRequestFactory instance.

Parameters:
service - The service used to match WURFLRequest
requestFactory - The WURFLRequestFactory used to create WURFLRequest

DefaultWURFLManager

public DefaultWURFLManager(WURFLService service)
This constructor build a WURFLManagerImpl from a WURFLService instance using DefaultWURFLRequestFactory as WURFLRequestFactory.

Parameters:
service - The service used to match WURFLRequest
Method Detail

getDeviceForRequest

public Device getDeviceForRequest(javax.servlet.http.HttpServletRequest request)
Return a Device instance from HttpServletRequest instance.

Specified by:
getDeviceForRequest in interface WURFLManager
Parameters:
request - The HttpServletRequest to match.

getDeviceForRequest

public Device getDeviceForRequest(WURFLRequest request)
Return a Device instance from WURFLRequest instance.

This method skip the use of WURFLRequestFactory.

Specified by:
getDeviceForRequest in interface WURFLManager
Parameters:
request - The WURFLRequest to match.

getDeviceForRequest

public Device getDeviceForRequest(String userAgent)
Return a Device instance from user-agent String.

This method uses WURFLRequestFactory.createRequest(String).

Specified by:
getDeviceForRequest in interface WURFLManager
Parameters:
userAgent - The user-agent String to match.


Copyright © 2008-2010 WURFL-Pro srl. All Rights Reserved.