sky.common.session
Interface Session

All Known Implementing Classes:
BaseSession

public interface Session

Session is associated with a perticular user and acts as a container for events that were generated by the user as a result of interacting with the web application. Sessions are used to tabulate and track all the activities that a user may be carrying out while using the web application.

$RCSfile: Session.java,v $
$Revision: 1.4 $, $Date: 2005/04/24 03:14:00 $


Method Summary
 void addEvent(Event event)
          Add an event to this session
 void clearEvents()
          Clear all the events from this session.
 long getCreationTime()
          Get the first time this session was used.
 java.util.Iterator getEvents()
          Get an iterator to a list of events that is associated with this session.
 java.lang.String getId()
          Get this session's unique id
 java.lang.String getIp()
          Get this session's ip address.
 long getLastAccessedTime()
          Get the last time this session was used.
 long getLifeTime()
          Get the life time (duration) this session has been active for.
 void persistEvents()
          Persist all the events from this session.
 java.lang.String toHTMLString()
          HTML String representation of this session.
 java.lang.String toString()
          String representation of this session.
 

Method Detail

getId

public java.lang.String getId()
Get this session's unique id

Returns:
unique id

getIp

public java.lang.String getIp()
Get this session's ip address.

Returns:
ip address.

getLastAccessedTime

public long getLastAccessedTime()
Get the last time this session was used.

Returns:
time in milliseconds since midnight, Jan 1, 1970 (GMT)

getCreationTime

public long getCreationTime()
Get the first time this session was used.

Returns:
time in milliseconds since midnight, Jan 1, 1970 (GMT)

getLifeTime

public long getLifeTime()
Get the life time (duration) this session has been active for.

Returns:
milliseconds

getEvents

public java.util.Iterator getEvents()
Get an iterator to a list of events that is associated with this session.

Returns:
iterator to list of events.

addEvent

public void addEvent(Event event)
Add an event to this session


clearEvents

public void clearEvents()
Clear all the events from this session.


persistEvents

public void persistEvents()
Persist all the events from this session.


toString

public java.lang.String toString()
String representation of this session.

Returns:
string representation of this session.

toHTMLString

public java.lang.String toHTMLString()
HTML String representation of this session.

Returns:
HTML string representation.