org.benow.web.path.page.ua
Class UserAgentMatcherManager

java.lang.Object
  extended by org.benow.web.path.page.ua.UserAgentMatcherManager

public class UserAgentMatcherManager
extends java.lang.Object

Manager that collects declared UserAgentMatchers and performs user agent matching.

User agents are mapped to a type, which is used for delivering specific content for that type. UserAgent resolution is done by querying the match(String) method on UserAgentMatcher implementors. The first Matcher to match is considered the useragent type. A default list of user agent matchers is fixed (DEFAULT_MATCHERS_IN_ORDER) but other matchers may be added by implementing the UserAgentMatcher interface and using packager mechanism. UserAgentMatchers may have a Position annotation to aid in positioning.

Author:
andy
See Also:
Packager, UserAgentMatcher

Field Summary
static java.lang.Class<?>[] DEFAULT_MATCHERS_IN_ORDER
           
static java.lang.String DEFAULT_USER_AGENT_TYPE
           
 
Constructor Summary
UserAgentMatcherManager()
           
 
Method Summary
static java.util.List<UserAgentMatcher> getMatchers()
           
static java.lang.String getUserAgentType()
           
static java.lang.String match()
           
static java.lang.String match(java.lang.String ua)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_USER_AGENT_TYPE

public static final java.lang.String DEFAULT_USER_AGENT_TYPE
See Also:
Constant Field Values

DEFAULT_MATCHERS_IN_ORDER

public static final java.lang.Class<?>[] DEFAULT_MATCHERS_IN_ORDER
Constructor Detail

UserAgentMatcherManager

public UserAgentMatcherManager()
Method Detail

getMatchers

public static java.util.List<UserAgentMatcher> getMatchers()

match

public static java.lang.String match(java.lang.String ua)

match

public static java.lang.String match()

getUserAgentType

public static java.lang.String getUserAgentType()