net.sourceforge.wurfl.core.handlers.classifiers
Class FilterChain

java.lang.Object
  extended by net.sourceforge.wurfl.core.handlers.classifiers.FilterChain

public class FilterChain
extends Object

A Filter chain-of-responsibility.

This class implement the pattern chain-of-responsibility of Filters

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

Constructor Summary
FilterChain()
           
 
Method Summary
 void add(Filter filter)
          Add a Filter to the filters list.
 void filter(String userAgent, String deviceID)
          Iterate over the filters list to find a Filter can handle the given user-agent.
 FilteredDevices getFilteredDevices(String userAgent)
          Returns the FilteredDevices containing the given user-agent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterChain

public FilterChain()
Method Detail

add

public void add(Filter filter)
Add a Filter to the filters list.

Parameters:
filter - The Filter to add.

filter

public void filter(String userAgent,
                   String deviceID)
Iterate over the filters list to find a Filter can handle the given user-agent.

Parameters:
userAgent - The user-agent associated with given device's id.
deviceID - The device's id to collect.

getFilteredDevices

public FilteredDevices getFilteredDevices(String userAgent)
Returns the FilteredDevices containing the given user-agent.

Parameters:
userAgent - The user-agent used to find FilteredDevices.
Returns:
The FilteredDevices instance containing given user-agent.


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