RobotIdentifierEnhancer.java from Tea Stats at Krugle
Show RobotIdentifierEnhancer.java syntax highlighted
/*
* This file is distributed under the GPL v2 as part of teastats site statistics package
* http://teastats.sourceforge.net
*/
package net.time4tea.webstats.enhancer.identify;
import net.time4tea.webstats.identify.Identified;
import net.time4tea.webstats.identify.RobotIdentifier;
import net.time4tea.webstats.record.ObjectAttribute;
import net.time4tea.webstats.session.Session;
/**
* Originally richja Apr 1, 2006
*/
public class RobotIdentifierEnhancer extends AbstractCacheableEnhancer {
public RobotIdentifierEnhancer() {
identifier = new RobotIdentifier();
}
public ObjectAttribute getValue(Identified robot) {
return new ObjectAttribute("robot", robot);
}
public String getKey(Session record) {
return record.entryPage().getUserAgent();
}
}
See more files for this project here