org.jwall.web.audit.session
Class HeuristicSessionTracker

java.lang.Object
  extended by org.jwall.web.audit.session.AbstractSessionTracker
      extended by org.jwall.web.audit.session.HeuristicSessionTracker
All Implemented Interfaces:
AuditEventListener, SessionTracker

public class HeuristicSessionTracker
extends AbstractSessionTracker

This heuristic session-tracker implements the session-algorithm used by most popular web-statistic tools, e.g. WUM.

Author:
Christian Bockermann <chris@jwall.org>

Field Summary
 
Fields inherited from class org.jwall.web.audit.session.AbstractSessionTracker
activeSessions, sessionTimeOut, timedOutSessions, type
 
Constructor Summary
HeuristicSessionTracker(long sessionTime)
          This constructor creates a session-tracker based on heuristics.
 
Method Summary
 java.lang.String extractKey(AuditEvent evt)
          Since this tracker simply relies on the remote address as session key, this method will just return the event's sender-address.
 java.lang.String toString()
          This method returns a string of all events grouped by their session-id.
 
Methods inherited from class org.jwall.web.audit.session.AbstractSessionTracker
eventArrived, expireSession, getSession, getSessions, getSessionTimeOut, isExpired, reset, setSessionTimeOut, setStrictSessions, usesStrictSessions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HeuristicSessionTracker

public HeuristicSessionTracker(long sessionTime)
This constructor creates a session-tracker based on heuristics. Key to the session is simply the ip-address of the requests.

Parameters:
sessionTime -
Method Detail

extractKey

public java.lang.String extractKey(AuditEvent evt)
Since this tracker simply relies on the remote address as session key, this method will just return the event's sender-address.

Specified by:
extractKey in class AbstractSessionTracker
Parameters:
evt - The AuditEvent to extract a key-id from.
Returns:
A string with the ip-address of the event to be used as a session-id.

toString

public java.lang.String toString()
Description copied from class: AbstractSessionTracker
This method returns a string of all events grouped by their session-id.

Overrides:
toString in class AbstractSessionTracker
Returns:
A string holding all sessions