org.jwall.web.audit.session
Interface SessionTracker

All Superinterfaces:
AuditEventListener
All Known Implementing Classes:
AbstractSessionTracker, CookieSessionTracker, HeuristicSessionTracker

public interface SessionTracker
extends AuditEventListener

This interface defines the basic function of a session tracker.

Author:
Christian Bockermann <chris@jwall.org>

Method Summary
 void eventArrived(AuditEvent event)
          This method simply associates the give event with a session or creates a new session if this event is not related to a previous one.
 java.util.Collection<Session> getSessions()
          Returns a list (collection) of the sessions that have been created/observed by this tracker.
 long getSessionTimeOut()
           
 void reset()
          This method resets the tracker to a clean state, forgetting about all sessions.
 void setSessionTimeOut(long s)
           
 void setStrictSessions(boolean b)
          Enables strict-mode for tracking/creating new sessions.
 boolean usesStrictSessions()
          Returns true, if the tracker only produces strict sessions.
 

Method Detail

setStrictSessions

void setStrictSessions(boolean b)
Enables strict-mode for tracking/creating new sessions. When settings this to true, new sessions are only created by session-identifiers sent from the server-side (Set-Cookie, href,...).

Parameters:
b -

setSessionTimeOut

void setSessionTimeOut(long s)

getSessionTimeOut

long getSessionTimeOut()

usesStrictSessions

boolean usesStrictSessions()
Returns true, if the tracker only produces strict sessions.

Returns:
true, if this tracker creates only strict sessions.

eventArrived

void eventArrived(AuditEvent event)
This method simply associates the give event with a session or creates a new session if this event is not related to a previous one.

Specified by:
eventArrived in interface AuditEventListener
Parameters:
event -

reset

void reset()
This method resets the tracker to a clean state, forgetting about all sessions.


getSessions

java.util.Collection<Session> getSessions()
Returns a list (collection) of the sessions that have been created/observed by this tracker. This collections contains all active and inactive sessions.

Returns:
A collection of the sessions created by this tracker.