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:
EventListener<AuditEvent>, 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>

Constructor Summary
HeuristicSessionTracker(long sessionTime)
          This constructor creates a session-tracker based on heuristics.
 
Method Summary
 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.
 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, eventsArrived, getSession, getSessions, getSessionTimeOut, isExpired, reset, setSessionTimeOut, setStrictSessions, usesStrictSessions
 
Methods inherited from class java.lang.Object
equals, 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 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 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


Copyright © 2012 jwall.org. All Rights Reserved.