net.sourceforge.wurfl.core.request
Class DefaultWURFLRequest

java.lang.Object
  extended by net.sourceforge.wurfl.core.request.DefaultWURFLRequest
All Implemented Interfaces:
Serializable, WURFLRequest

public class DefaultWURFLRequest
extends Object
implements WURFLRequest, Serializable

WURFLRequest default implementation.

Version:
$Id: DefaultWURFLRequest.java 934 2012-03-27 13:34:26Z fulvio.crivellaro $
See Also:
Serialized Form

Constructor Summary
DefaultWURFLRequest(String userAgent)
           
DefaultWURFLRequest(String userAgent, String userAgentProfile)
          Constructor by user-agent, UAProf, and xhtml support
DefaultWURFLRequest(String userAgent, String userAgentProfile, Map<String,String> headers)
           
 
Method Summary
 boolean equals(Object other)
           
 String getHeader(String headerName)
           
 Map<String,String> getHeaders()
           
 String getUserAgent()
          Return the requester user-agent.
 String getUserAgentProfile()
          Return the requester UAProf URL.
 int hashCode()
           
 boolean isBot()
          Says if this request comes from a bot.
 boolean isDesktopBrowser()
          Says if this request is supposed to come from a desktop browser.
 boolean isDesktopBrowserHeavyDutyAnalysis()
          Says if this request comes from a desktop browser.
 boolean isMobileBrowser()
          Says if this request comes from a mobile browser.
 boolean isSmartTvBrowser()
          Says if this request comes from a SmartTV.
 boolean mobileKeywordsDetected()
           
 boolean screenSizeDetected()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultWURFLRequest

public DefaultWURFLRequest(String userAgent)

DefaultWURFLRequest

public DefaultWURFLRequest(String userAgent,
                           String userAgentProfile)
Constructor by user-agent, UAProf, and xhtml support

Parameters:
userAgent - The requester device user-agent.
userAgentProfile - The UAProf URL, can be null

DefaultWURFLRequest

public DefaultWURFLRequest(String userAgent,
                           String userAgentProfile,
                           Map<String,String> headers)
Method Detail

getUserAgent

public String getUserAgent()
Return the requester user-agent.

Specified by:
getUserAgent in interface WURFLRequest
Returns:
A string containing requester user-agent.

getUserAgentProfile

public String getUserAgentProfile()
Return the requester UAProf URL.

Specified by:
getUserAgentProfile in interface WURFLRequest
Returns:
A string containig URL of requester UAProf.

getHeader

public String getHeader(String headerName)
Specified by:
getHeader in interface WURFLRequest
Returns:
Http header value

getHeaders

public Map<String,String> getHeaders()
Specified by:
getHeaders in interface WURFLRequest
Returns:
read-only headers map

isMobileBrowser

public boolean isMobileBrowser()
Description copied from interface: WURFLRequest
Says if this request comes from a mobile browser.

Specified by:
isMobileBrowser in interface WURFLRequest
Returns:

mobileKeywordsDetected

public boolean mobileKeywordsDetected()

screenSizeDetected

public boolean screenSizeDetected()

isDesktopBrowser

public boolean isDesktopBrowser()
Description copied from interface: WURFLRequest
Says if this request is supposed to come from a desktop browser.

Specified by:
isDesktopBrowser in interface WURFLRequest
Returns:

isDesktopBrowserHeavyDutyAnalysis

public boolean isDesktopBrowserHeavyDutyAnalysis()
Description copied from interface: WURFLRequest
Says if this request comes from a desktop browser.

Specified by:
isDesktopBrowserHeavyDutyAnalysis in interface WURFLRequest
Returns:

isSmartTvBrowser

public boolean isSmartTvBrowser()
Description copied from interface: WURFLRequest
Says if this request comes from a SmartTV.

Specified by:
isSmartTvBrowser in interface WURFLRequest
Returns:

isBot

public boolean isBot()
Description copied from interface: WURFLRequest
Says if this request comes from a bot.

Specified by:
isBot in interface WURFLRequest
Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 ScientiaMobile Inc.. All Rights Reserved.