GigaSpaces - Open Spaces

org.openspaces.jee.sessions.jetty
Class GigaSessionManager.Session

java.lang.Object
  extended by org.mortbay.jetty.servlet.AbstractSessionManager.Session
      extended by org.openspaces.jee.sessions.jetty.GigaSessionManager.Session
All Implemented Interfaces:
Serializable, 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 behaviour around SessionData.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mortbay.jetty.servlet.AbstractSessionManager.Session
_accessed, _clusterId, _cookieSet, _created, _doInvalidate, _idChanged, _invalid, _lastAccessed, _maxIdleMs, _newSession, _nodeId, _requests, _values
 
Constructor Summary
protected GigaSessionManager.Session(HttpServletRequest request)
          Session from a request.
protected GigaSessionManager.Session(SessionData data)
           
 
Method Summary
protected  void access(long time)
          Entry to session.
protected  void complete()
          Exit from session If the session attributes changed then always write the session to the cloud.
protected  void cookieSet()
           
protected  void didActivate()
           
 String getClusterId()
           
 String getNodeId()
           
protected  Map newAttributeMap()
           
 void removeAttribute(String name)
           
 void setAttribute(String name, Object value)
           
 void setMaxInactiveInterval(int seconds)
          We override it here so we can reset the expiry time based on the
protected  void timeout()
           
protected  void willPassivate()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GigaSessionManager.Session

protected GigaSessionManager.Session(HttpServletRequest request)
Session from a request.


GigaSessionManager.Session

protected GigaSessionManager.Session(SessionData data)
Method Detail

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 HttpSession
Overrides:
setAttribute in class org.mortbay.jetty.servlet.AbstractSessionManager.Session

removeAttribute

public void removeAttribute(String name)
Specified by:
removeAttribute in interface 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 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

GigaSpaces - Open Spaces

Copyright © GigaSpaces.