|
|||||||||
| Home >> All >> com >> RuntimeCollective >> [ sitemap overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.RuntimeCollective.sitemap
Class HitTracker

java.lang.Objectcom.RuntimeCollective.sitemap.HitTracker
- public class HitTracker
- extends java.lang.Object
Singleton class that tracks hits for SiteLocations marked "isOfInterest".
This default implementation does nothing; you should subclass, and override the
logHit method.
To use your subclass, you must add a parameter to web.xml under the PARAM_NAME
key, with the fully resolved class name of your subclass.
For example:
<init-param>
<param-name>param.hitTracker</param-name>
<param-value>com.RuntimeCollective.se.PivotalHitTracker</param-value>
</init-param>
| Field Summary | |
private static HitTracker |
instance
|
private static java.lang.String |
PARAM_NAME
The parameter name that the HitTracker subclass will be stored under, in RuntimeParameters |
| Constructor Summary | |
protected |
HitTracker()
Make a new default HitTracker. |
| Method Summary | |
static HitTracker |
getInstance()
Get an instance of the HitTracker singleton. |
void |
logHit(com.RuntimeCollective.sitemap.bean.SiteLocation sl,
com.RuntimeCollective.webapps.bean.User user)
Log a hit for this SiteLocation. |
void |
trackContent(com.RuntimeCollective.sitemap.bean.SiteLocation sl,
javax.servlet.http.HttpServletRequest request)
Track a hit for this SiteLocation, by calling logHit, iff the specifed
SiteLocation is of interest (isOfInterest returns true),
and the user is not null. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
PARAM_NAME
private static final java.lang.String PARAM_NAME
- The parameter name that the HitTracker subclass will be stored under, in RuntimeParameters
- See Also:
- Constant Field Values
instance
private static HitTracker instance
| Constructor Detail |
HitTracker
protected HitTracker()
- Make a new default HitTracker.
You may override this constructor for more interesting behaviour; does nothing by default.
| Method Detail |
getInstance
public static HitTracker getInstance()
- Get an instance of the HitTracker singleton. Will check for the presence of
PARAM_NAMEin RuntimeParameters; will create an instance of the class specified by this, if present.
trackContent
public void trackContent(com.RuntimeCollective.sitemap.bean.SiteLocation sl, javax.servlet.http.HttpServletRequest request)
- Track a hit for this SiteLocation, by calling
logHit, iff the specifed SiteLocation is of interest (isOfInterestreturnstrue), and the user is not null.
logHit
public void logHit(com.RuntimeCollective.sitemap.bean.SiteLocation sl, com.RuntimeCollective.webapps.bean.User user)
- Log a hit for this SiteLocation. You should not call this method directly;
it is called by trackContent.
You should override this method in your subclasses; its default behaviour is to do nothing.
|
|||||||||
| Home >> All >> com >> RuntimeCollective >> [ sitemap overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.RuntimeCollective.sitemap.HitTracker