com.caucho.quercus.lib.session
Class ProSessionManager

java.lang.Object
  extended by com.caucho.quercus.lib.session.QuercusSessionManager
      extended by com.caucho.quercus.lib.session.ProSessionManager
All Implemented Interfaces:
AlarmListener, java.util.EventListener

public class ProSessionManager
extends QuercusSessionManager

Stripped down version of com.caucho.server.session.SessionManager, customized to PHP instead of J2EE sessions.


Field Summary
protected static L10N L
           
protected static java.util.logging.Logger log
           
 
Fields inherited from class com.caucho.quercus.lib.session.QuercusSessionManager
_isClosed, _sessionCreateCount, _sessionIter, _sessionList, _sessionMax, _sessions, _sessionTimeoutCount, _statisticsLock
 
Constructor Summary
ProSessionManager(QuercusContext quercus, java.lang.String contextId)
           
 
Method Summary
 java.lang.String createSessionId(Env env)
          Creates a pseudo-random session id.
 long getMaxIdleTime()
           
 boolean isEmpty(java.lang.Object obj)
          Checks if the session is empty.
 void load(java.io.InputStream in, java.lang.Object obj)
          Loads the session.
 void notifyRemove(java.lang.Object id)
          Notification from the cluster.
 void notifyUpdate(java.lang.Object id)
          Notification from the cluster.
 void store(java.io.OutputStream out, java.lang.Object obj)
          Saves the session.
 
Methods inherited from class com.caucho.quercus.lib.session.QuercusSessionManager
close, create, createSession, createSessionValue, getActiveSessionCount, getReuseSessionId, getSaveOnlyOnShutdown, getSession, getSessionCreateCount, getSessionMax, getSessionTimeoutCount, handleAlarm, isClosed, load, load, notifyRemove, notifyUpdate, remove, removeSession, saveSession, setAlwaysLoadSession, setAlwaysSaveSession, setCookieAppendServerIndex, setCookieLength, setReuseSessionId, setSaveOnlyOnShutdown, setSaveOnShutdown, setSessionMax, setSessionTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

L

protected static final L10N L

log

protected static final java.util.logging.Logger log
Constructor Detail

ProSessionManager

public ProSessionManager(QuercusContext quercus,
                         java.lang.String contextId)
Method Detail

createSessionId

public java.lang.String createSessionId(Env env)
Creates a pseudo-random session id. If there's an old id and the group matches, then use it because different applications on the same matchine should use the same cookie.

Overrides:
createSessionId in class QuercusSessionManager

getMaxIdleTime

public long getMaxIdleTime()

load

public void load(java.io.InputStream in,
                 java.lang.Object obj)
          throws java.io.IOException
Loads the session.

Parameters:
in - the input stream containing the serialized session
obj - the session object to be deserialized
Throws:
java.io.IOException

isEmpty

public boolean isEmpty(java.lang.Object obj)
Checks if the session is empty.

Overrides:
isEmpty in class QuercusSessionManager

notifyRemove

public void notifyRemove(java.lang.Object id)
Notification from the cluster.


notifyUpdate

public void notifyUpdate(java.lang.Object id)
Notification from the cluster.


store

public void store(java.io.OutputStream out,
                  java.lang.Object obj)
           throws java.io.IOException
Saves the session.

Overrides:
store in class QuercusSessionManager
Throws:
java.io.IOException