net.sourceforge.wurfl.core.handlers.matchers
Class MatcherChain

java.lang.Object
  extended by net.sourceforge.wurfl.core.handlers.matchers.MatcherChain

public class MatcherChain
extends Object

The Matcher chain-of-responsibility.

This class implements the chain-of-responsibility pattern for the user-agent Matcher. It is best practice the latest matcher can handle everything and at least must returns generic

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

Constructor Summary
MatcherChain()
           
 
Method Summary
 void add(Matcher matcher)
          Add a matcher to the chain.
 List getMatchers()
          Return the list containing the user-agent matchers.
 String match(WURFLRequest request, FilteredDevices filteredDevices)
          Perform matching across Matcher chains.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatcherChain

public MatcherChain()
Method Detail

add

public void add(Matcher matcher)
Add a matcher to the chain.

Parameters:
matcher - The Matcher to add.

getMatchers

public List getMatchers()
Return the list containing the user-agent matchers.

Returns:
A List of Matchers.

match

public String match(WURFLRequest request,
                    FilteredDevices filteredDevices)
Perform matching across Matcher chains.

Parameters:
request - The WURFLRequest to match.
Returns:
The matched device identifier.


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