org.openspaces.jee.sessions.jetty
Class GigaSessionManager.Session
java.lang.Object
org.mortbay.jetty.servlet.AbstractSessionManager.Session
org.openspaces.jee.sessions.jetty.GigaSessionManager.Session
- All Implemented Interfaces:
- Serializable, javax.servlet.http.HttpSession, org.mortbay.jetty.servlet.AbstractSessionManager.SessionIf
- Enclosing class:
- GigaSessionManager
public class GigaSessionManager.Session
- extends org.mortbay.jetty.servlet.AbstractSessionManager.Session
Session
A session in memory of a Context. Adds behavior around SessionData.
- See Also:
- Serialized Form
Fields inherited from class org.mortbay.jetty.servlet.AbstractSessionManager.Session |
_accessed, _clusterId, _cookieSet, _created, _doInvalidate, _idChanged, _invalid, _lastAccessed, _maxIdleMs, _newSession, _nodeId, _requests, _values |
Methods inherited from class org.mortbay.jetty.servlet.AbstractSessionManager.Session |
bindValue, doInvalidate, getAttribute, getAttributeNames, getCookieSetTime, getCreationTime, getId, getLastAccessedTime, getMaxInactiveInterval, getServletContext, getSession, getSessionContext, getValue, getValueNames, initValues, invalidate, isIdChanged, isNew, isValid, putValue, removeValue, setIdChanged, toString, unbindValue |
GigaSessionManager.Session
protected GigaSessionManager.Session(javax.servlet.http.HttpServletRequest request)
- Session from a request.
GigaSessionManager.Session
protected GigaSessionManager.Session(SessionData data)
cookieSet
protected void cookieSet()
- Overrides:
cookieSet
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
newAttributeMap
protected Map newAttributeMap()
- Specified by:
newAttributeMap
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
setAttribute
public void setAttribute(String name,
Object value)
- Specified by:
setAttribute
in interface javax.servlet.http.HttpSession
- Overrides:
setAttribute
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttribute
in interface javax.servlet.http.HttpSession
- Overrides:
removeAttribute
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
access
protected void access(long time)
- Entry to session.
Called by SessionHandler on inbound request and the session already exists in this node's memory.
- Overrides:
access
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
- See Also:
AbstractSessionManager.Session.access(long)
setMaxInactiveInterval
public void setMaxInactiveInterval(int seconds)
- We override it here so we can reset the expiry time based on the
- Specified by:
setMaxInactiveInterval
in interface javax.servlet.http.HttpSession
- Overrides:
setMaxInactiveInterval
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
complete
protected void complete()
- Exit from session
If the session attributes changed then always write the session
to the cloud.
If just the session access time changed, we don't always write out the
session, because the gigaspace will serialize the unchanged sesssion
attributes. To save on serialization overheads, we only write out the
session when only the access time has changed if the time at which we
last saved the session exceeds the chosen save interval.
- Overrides:
complete
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
- See Also:
AbstractSessionManager.Session.complete()
timeout
protected void timeout()
throws IllegalStateException
- Overrides:
timeout
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
- Throws:
IllegalStateException
willPassivate
protected void willPassivate()
- Overrides:
willPassivate
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
didActivate
protected void didActivate()
- Overrides:
didActivate
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
getClusterId
public String getClusterId()
- Overrides:
getClusterId
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
getNodeId
public String getNodeId()
- Overrides:
getNodeId
in class org.mortbay.jetty.servlet.AbstractSessionManager.Session
Copyright © GigaSpaces.