org.codehaus.wadi.tomcat55
Class TomcatSession
java.lang.Object
org.codehaus.wadi.impl.SimpleEvictable
org.codehaus.wadi.impl.AbstractMotable
org.codehaus.wadi.impl.AbstractContext
org.codehaus.wadi.impl.StandardSession
org.codehaus.wadi.impl.DistributableSession
org.codehaus.wadi.impl.AbstractReplicableSession
org.codehaus.wadi.impl.AtomicallyReplicableSession
org.codehaus.wadi.tomcat55.TomcatSession
- All Implemented Interfaces:
- org.codehaus.wadi.AttributesConfig, org.codehaus.wadi.Config, org.codehaus.wadi.Context, org.codehaus.wadi.DistributableAttributesConfig, org.codehaus.wadi.Evictable, org.codehaus.wadi.Motable, org.codehaus.wadi.RWLockListener, Serializable, org.codehaus.wadi.SerializableContent, org.codehaus.wadi.Session, Session, org.codehaus.wadi.WADIHttpSession
- public class TomcatSession
- extends org.codehaus.wadi.impl.AtomicallyReplicableSession
- implements Session
Interestingly, in Tomcat a Session is a facade (for internal use) over an HttpSession (for external use), but
in WADI we have a Session (rich implementation for internal use) which is facaded by an HttpSession (constrains
available API for external use). Thus, our implementation is Tomcat's facade and vice versa ! Confused ? I was...
This is bad news, because it makes it awkward to combine Tomcat and WADI functionality dynamically. For the moment
all Tomcat sessions are ReplicableSessions. I will come up with a solution to this later.
- Version:
- $Revision: 1414 $
- Author:
- Jules Gosnell
- See Also:
- Serialized Form
Fields inherited from class org.codehaus.wadi.impl.AtomicallyReplicableSession |
_dirty, _replicater, _semantics |
Fields inherited from class org.codehaus.wadi.impl.StandardSession |
_attributes, _config, _emptyEnumeration, _emptyStringArray, _httpSessionEvent, _wrapper |
Fields inherited from class org.codehaus.wadi.impl.AbstractContext |
_lock |
Fields inherited from class org.codehaus.wadi.impl.AbstractMotable |
_name |
Fields inherited from class org.codehaus.wadi.impl.SimpleEvictable |
_creationTime, _lastAccessedTime, _maxInactiveInterval |
Constructor Summary |
TomcatSession(org.codehaus.wadi.ReplicableSessionConfig config)
|
Methods inherited from class org.codehaus.wadi.impl.AtomicallyReplicableSession |
getAttribute, readEnded, removeAttribute, setAttribute, setMaxInactiveInterval |
Methods inherited from class org.codehaus.wadi.impl.AbstractReplicableSession |
copy, destroy, init, init2, mote |
Methods inherited from class org.codehaus.wadi.impl.DistributableSession |
findHelper, getBodyAsByteArray, getHttpSessionAttributeListenersRegistered, getListenerNames, getStreamer, readContent, setBodyAsByteArray, writeContent |
Methods inherited from class org.codehaus.wadi.impl.StandardSession |
getAttributeNameEnumeration, getAttributeNameSet, getAttributeNameStringArray, getConfig, getHttpSessionEvent, getId, getValuePool, getWrapper, notifyAttributeListeners, notifyBindingListeners, setLastAccessedTime |
Methods inherited from class org.codehaus.wadi.impl.AbstractContext |
getBodyAsByteBuffer, getExclusiveLock, getSharedLock, setBodyAsByteBuffer |
Methods inherited from class org.codehaus.wadi.impl.AbstractMotable |
getName |
Methods inherited from class org.codehaus.wadi.impl.SimpleEvictable |
checkTimeframe, copy, getCreationTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, isNew, mote |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.codehaus.wadi.DistributableAttributesConfig |
getHttpSessionEvent |
Methods inherited from interface org.codehaus.wadi.AttributesConfig |
getValuePool |
Methods inherited from interface org.codehaus.wadi.Context |
getExclusiveLock, getSharedLock |
Methods inherited from interface org.codehaus.wadi.Motable |
getBodyAsByteBuffer, getName, setBodyAsByteBuffer |
Methods inherited from interface org.codehaus.wadi.Evictable |
checkTimeframe, copy, getCreationTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, isNew, mote |
_log
protected static final Log _log
_authType
protected transient String _authType
_principal
protected transient Principal _principal
_notes
protected final transient Map _notes
_listeners
protected List _listeners
TomcatSession
public TomcatSession(org.codehaus.wadi.ReplicableSessionConfig config)
destroy
public void destroy()
- Specified by:
destroy
in interface org.codehaus.wadi.Evictable
setId
public void setId(String id)
- Specified by:
setId
in interface Session
setCreationTime
public void setCreationTime(long creationTime)
- Specified by:
setCreationTime
in interface Session
getInfo
public String getInfo()
- Specified by:
getInfo
in interface Session
getSession
public HttpSession getSession()
- Specified by:
getSession
in interface Session
getManager
public Manager getManager()
- Specified by:
getManager
in interface Session
setManager
public void setManager(Manager manager)
- Specified by:
setManager
in interface Session
getAuthType
public String getAuthType()
- Specified by:
getAuthType
in interface Session
setAuthType
public void setAuthType(String authType)
- Specified by:
setAuthType
in interface Session
getPrincipal
public Principal getPrincipal()
- Specified by:
getPrincipal
in interface Session
setPrincipal
public void setPrincipal(Principal principal)
- Specified by:
setPrincipal
in interface Session
setNote
public void setNote(String name,
Object value)
- Specified by:
setNote
in interface Session
getNote
public Object getNote(String name)
- Specified by:
getNote
in interface Session
removeNote
public void removeNote(String name)
- Specified by:
removeNote
in interface Session
getNoteNames
public Iterator getNoteNames()
- Specified by:
getNoteNames
in interface Session
getSessionListeners
public List getSessionListeners()
addSessionListener
public void addSessionListener(SessionListener listener)
- Specified by:
addSessionListener
in interface Session
removeSessionListener
public void removeSessionListener(SessionListener listener)
- Specified by:
removeSessionListener
in interface Session
setValid
public void setValid(boolean isValid)
- Specified by:
setValid
in interface Session
isValid
public boolean isValid()
- Specified by:
isValid
in interface Session
setNew
public void setNew(boolean isNew)
- Specified by:
setNew
in interface Session
access
public void access()
- Specified by:
access
in interface Session
endAccess
public void endAccess()
- Specified by:
endAccess
in interface Session
recycle
public void recycle()
- Specified by:
recycle
in interface Session
expire
public void expire()
- Specified by:
expire
in interface Session
getIdInternal
public String getIdInternal()
- Specified by:
getIdInternal
in interface Session
getLastAccessedTime
public long getLastAccessedTime()
- Specified by:
getLastAccessedTime
in interface Session
getLastAccessedTimeInternal
public long getLastAccessedTimeInternal()
- Specified by:
getLastAccessedTimeInternal
in interface Session
Copyright © 2004-2006 Core Developers Network Ltd.. All Rights Reserved.