jrun.servlet.session
Class SessionHolder
java.lang.Object
|
+--jrun.servlet.session.SessionHolder
- All Implemented Interfaces:
- java.lang.Runnable
- public final class SessionHolder
- extends java.lang.Object
- implements java.lang.Runnable
Represents a single session object. The session object may be
resident in memory, or it may have been swapped to disk.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STATE_INMEMORY
public static final int STATE_INMEMORY
STATE_SWAPPED
public static final int STATE_SWAPPED
STATE_LOST
public static final int STATE_LOST
STATE_INVALID
public static final int STATE_INVALID
service
protected Session service
state
protected int state
lastAccessMS
protected long lastAccessMS
inactiveMS
protected long inactiveMS
expireTime
protected long expireTime
lruID
protected int lruID
inMemorySession
protected JRunSession inMemorySession
sessionID
protected java.lang.String sessionID
SessionHolder
public SessionHolder(Session service,
java.lang.String sessionID)
- Construct a new SessionHolder
- Parameters:
service - The JRunSessionServicesessionID - The session ID
SessionHolder
public SessionHolder(Session service,
JRunSession session)
- Construct a new SessionHolder
- Parameters:
service - The JRunSessionServicesession - The session object
getSession
public JRunSession getSession()
- Gets the session object. If the session has been swapped to disk,
request the object from the storage provider.
- Returns:
- null if the session could not be loaded
setSession
public void setSession(JRunSession session)
getSessionID
public java.lang.String getSessionID()
reschedule
protected void reschedule(long inactiveMS)
- Reschedule the timer for the session invalidation
- Parameters:
inactiveMS - The milliseconds of inactivity before invalidating
setLastAccessTime
protected void setLastAccessTime(long ms)
- Sets the last accessed time
setLRUID
protected void setLRUID(int id)
getLRUID
protected int getLRUID()
setState
protected void setState(int state)
isInMemory
protected boolean isInMemory()
isSwapped
protected boolean isSwapped()
run
public void run()
- Called by the Scheduler to perform session invalidation
- Specified by:
run in interface java.lang.Runnable
Copyright � 2002 Macromedia Corporation. All Rights Reserved.