|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.impl.DefaultScriptSessionManager
public class DefaultScriptSessionManager
A default implementation of ScriptSessionManager.
There are synchronization constraints on this class that could be broken
by subclasses. Specifically anyone accessing either sessionMap
or pageSessionMap must be holding the sessionLock.
In addition you should note that DefaultScriptSession and
DefaultScriptSessionManager make calls to each other and you should
take care not to break any constraints in inheriting from these classes.
| Field Summary | |
|---|---|
static java.lang.String |
ATTRIBUTE_HTTPSESSIONID
Use of this attribute is currently discouraged, we may make this public in a later release. |
static java.lang.String |
ATTRIBUTE_PAGE
Use of this attribute is currently discouraged, we may make this public in a later release. |
| Fields inherited from interface org.directwebremoting.extend.ScriptSessionManager |
|---|
DEFAULT_TIMEOUT_MILLIS |
| Constructor Summary | |
|---|---|
DefaultScriptSessionManager()
Setup a timer that will invalidate sessions |
|
| Method Summary | |
|---|---|
void |
addScriptSessionListener(ScriptSessionListener li)
Maintain the list of ScriptSessionListeners |
RealScriptSession |
createScriptSession(java.lang.String page,
java.lang.String httpSessionId)
When a new client page-loads, we create a script session. |
java.util.Collection<ScriptSession> |
getAllScriptSessions()
Get a list of all the currently known ScriptSessions by id. |
RealScriptSession |
getScriptSession(java.lang.String id,
java.lang.String page,
java.lang.String httpSessionId)
For a given script session id, return the related ScriptSession object or null if the id is not known. |
java.util.Collection<RealScriptSession> |
getScriptSessionsByHttpSessionId(java.lang.String httpSessionId)
Lookup all the windows associated with a given browser |
java.util.Collection<ScriptSession> |
getScriptSessionsByPage(java.lang.String url)
For a given script session id, either create a new ScriptSession object or retrieve an existing one if one exists. |
long |
getScriptSessionTimeout()
Accessor for the time (in milliseconds) when unused ScriptSessions will expire |
void |
removeScriptSessionListener(ScriptSessionListener li)
Maintain the list of ScriptSessionListeners |
void |
setPageNormalizer(PageNormalizer pageNormalizer)
Accessor for the PageNormalizer. |
void |
setScriptSessionCheckTime(long scriptSessionCheckTime)
|
void |
setScriptSessionTimeout(long scriptSessionTimeout)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ATTRIBUTE_HTTPSESSIONID
public static final java.lang.String ATTRIBUTE_PAGE
| Constructor Detail |
|---|
public DefaultScriptSessionManager()
| Method Detail |
|---|
public RealScriptSession getScriptSession(java.lang.String id,
java.lang.String page,
java.lang.String httpSessionId)
ScriptSessionManager
getScriptSession in interface ScriptSessionManagerid - The id to get a ScriptSession object forpage - The URL including 'http://', up to (but not including) '?' or '#' (or null if not known)httpSessionId - The session ID (or null if not known)
public RealScriptSession createScriptSession(java.lang.String page,
java.lang.String httpSessionId)
ScriptSessionManager
createScriptSession in interface ScriptSessionManagerpage - The URL including 'http://', up to (but not including) '?' or '#'httpSessionId - The session ID (or null if not known)
public java.util.Collection<ScriptSession> getScriptSessionsByPage(java.lang.String url)
ScriptSessionManager
getScriptSessionsByPage in interface ScriptSessionManagerurl - The URL including 'http://', up to (but not including) '?' or '#'
public java.util.Collection<RealScriptSession> getScriptSessionsByHttpSessionId(java.lang.String httpSessionId)
httpSessionId - The browser id to lookup
public java.util.Collection<ScriptSession> getAllScriptSessions()
ScriptSessionManager
getAllScriptSessions in interface ScriptSessionManagerpublic long getScriptSessionTimeout()
ScriptSessionManager
getScriptSessionTimeout in interface ScriptSessionManagerpublic void setScriptSessionTimeout(long scriptSessionTimeout)
public void addScriptSessionListener(ScriptSessionListener li)
ScriptSessionManagerScriptSessionListeners
addScriptSessionListener in interface ScriptSessionManagerli - the ScriptSessionListener to addpublic void removeScriptSessionListener(ScriptSessionListener li)
ScriptSessionManagerScriptSessionListeners
removeScriptSessionListener in interface ScriptSessionManagerli - the ScriptSessionListener to removepublic void setPageNormalizer(PageNormalizer pageNormalizer)
pageNormalizer - The new PageNormalizerpublic void setScriptSessionCheckTime(long scriptSessionCheckTime)
scriptSessionCheckTime - the scriptSessionCheckTime to set
|
Copyright ¬ 2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||