|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.wurfl.core.matchers.AbstractMatcher
public abstract class AbstractMatcher
Abstract implementation of Matcher.
It provides basic functionalities of matching. The matching strategy is:
| Field Summary | |
|---|---|
protected static boolean |
DEBUG
|
protected org.slf4j.Logger |
detected
Log detected |
protected InspectionManager |
inspectionManager
|
protected boolean |
isDebugEnabled
Log |
protected static org.slf4j.Logger |
logger
|
protected org.slf4j.Logger |
undetected
Log undetected |
| Fields inherited from interface net.sourceforge.wurfl.core.resource.ResourcePaths |
|---|
CATCH_ALL_RECOVERY_FILE, WURFL_CONFIG_FILE |
| Constructor Summary | |
|---|---|
AbstractMatcher(UserAgentNormalizer normalizer)
Build AbstractMatcher by handler and collected devices by user-agent. |
|
| Method Summary | |
|---|---|
protected String |
applyCatchAllRecoveryMatch(WURFLRequest request,
FilteredDevices filteredDevices)
Match the given request using the CatchAll strategy. |
protected String |
applyConclusiveMatch(WURFLRequest request)
Apply conclusive matching strategy, at least returns generic. |
protected String |
applyRecoveryMatch(WURFLRequest request)
Match the given request using the recovery matching strategy. |
Filter |
getFilter()
|
String |
getName()
|
protected String |
lookForMatchingUserAgent(String userAgent)
Match the given user-agent to collected user-agents. |
DeviceInfo |
match(WURFLRequest request)
Applies the matching strategy. |
String |
normalize(String userAgent)
delegate to inner normalizer. |
void |
setFilter(Filter filter)
|
void |
setInspectionManager(InspectionManager inspectionManager)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sourceforge.wurfl.core.matchers.Matcher |
|---|
canHandle |
| Field Detail |
|---|
protected static final org.slf4j.Logger logger
protected static final boolean DEBUG
protected final boolean isDebugEnabled
protected InspectionManager inspectionManager
protected final org.slf4j.Logger undetected
protected final org.slf4j.Logger detected
| Constructor Detail |
|---|
public AbstractMatcher(UserAgentNormalizer normalizer)
normalizer - | Method Detail |
|---|
public String toString()
toString in class Objectpublic final void setInspectionManager(InspectionManager inspectionManager)
public final void setFilter(Filter filter)
public final Filter getFilter()
getFilter in interface Matcherpublic final DeviceInfo match(WURFLRequest request)
The strategy is:
match in interface Matcherrequest - The request to match.
protected String applyConclusiveMatch(WURFLRequest request)
generic.
request - The request used to applying matching strategy.
protected String lookForMatchingUserAgent(String userAgent)
Apply RIS(FS) to default(first slash).
userAgent - The user-agent to match against.
protected String applyRecoveryMatch(WURFLRequest request)
request - The request to match.
generic.
protected String applyCatchAllRecoveryMatch(WURFLRequest request,
FilteredDevices filteredDevices)
Match the given request using the CatchAll strategy. The subclass can override this method, but must returns "generic" device al least.
TODO this method assumes the wurfl.xml + patch files contains the hard coded device's ids.
request - The request to match.
public final String normalize(String userAgent)
normalize in interface MatcheruserAgent -
public String getName()
getName in interface Matcher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||