net.sf.ooweb.sessions
Class Session

java.lang.Object
  extended by net.sf.ooweb.sessions.Session

public class Session
extends java.lang.Object

Base class for sessions used by OOWeb. Provides a simple implementation based around HashMap.

Since:
0.5
Author:
Robin Rawson-Tetley

Field Summary
protected  long lastTouched
           
protected  java.util.Map mapImpl
           
protected  java.lang.String name
           
 
Constructor Summary
Session(java.lang.String name)
          Creates a session with an optional name
 
Method Summary
 void dispose()
          Disposes of the session
 long getLastTouched()
          Returns the last time (since epoch) the session was touched
 java.util.Map getMap()
          Gets the Map implementation for this session
 java.lang.String getName()
           
 boolean isOlderThan(long timeout)
          Checks whether the session has expired based on session timeout value
 void touch()
          "Touches" the session to prevent it expiring
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapImpl

protected java.util.Map mapImpl

lastTouched

protected long lastTouched

name

protected java.lang.String name
Constructor Detail

Session

public Session(java.lang.String name)
Creates a session with an optional name

Method Detail

dispose

public void dispose()
Disposes of the session


touch

public void touch()
"Touches" the session to prevent it expiring


isOlderThan

public boolean isOlderThan(long timeout)
Checks whether the session has expired based on session timeout value


getLastTouched

public long getLastTouched()
Returns the last time (since epoch) the session was touched


getMap

public java.util.Map getMap()
Gets the Map implementation for this session


getName

public java.lang.String getName()


Copyright (C) 2005-2007 OOWeb Authors.