GigaSpaces XAP 9.7.2 API

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

java.lang.Object
  extended by org.eclipse.jetty.server.session.AbstractSession
      extended by org.openspaces.jee.sessions.jetty.GigaSessionManager.Session
All Implemented Interfaces:
javax.servlet.http.HttpSession, org.eclipse.jetty.server.session.AbstractSessionManager.SessionIf
Enclosing class:
GigaSessionManager

public class GigaSessionManager.Session
extends org.eclipse.jetty.server.session.AbstractSession

Session A session in memory of a Context. Adds behavior around SessionData.


Field Summary
 
Fields inherited from class org.eclipse.jetty.server.session.AbstractSession
_jdbcAttributes
 
Constructor Summary
protected GigaSessionManager.Session(org.eclipse.jetty.server.session.AbstractSessionManager manager, javax.servlet.http.HttpServletRequest request)
          Session from a request.
protected GigaSessionManager.Session(org.eclipse.jetty.server.session.AbstractSessionManager manager, SessionData data)
           
 
Method Summary
protected  boolean 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()
           
 void didActivate()
           
 String getClusterId()
           
 String getNodeId()
           
 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()
           
 void willPassivate()
           
 
Methods inherited from class org.eclipse.jetty.server.session.AbstractSession
bindValue, checkValid, clearAttributes, doGet, doInvalidate, doPutOrRemove, getAccessed, getAttribute, getAttributeNames, getAttributes, getCookieSetTime, getCreationTime, getId, getLastAccessedTime, getMaxInactiveInterval, getNames, getRequests, getServletContext, getSession, getSessionContext, getValue, getValueNames, invalidate, isIdChanged, isNew, isValid, putValue, removeValue, setIdChanged, setRequests, 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(org.eclipse.jetty.server.session.AbstractSessionManager manager,
                                     javax.servlet.http.HttpServletRequest request)
Session from a request.


GigaSessionManager.Session

protected GigaSessionManager.Session(org.eclipse.jetty.server.session.AbstractSessionManager manager,
                                     SessionData data)
Method Detail

cookieSet

protected void cookieSet()
Overrides:
cookieSet in class org.eclipse.jetty.server.session.AbstractSession

setAttribute

public void setAttribute(String name,
                         Object value)
Specified by:
setAttribute in interface javax.servlet.http.HttpSession
Overrides:
setAttribute in class org.eclipse.jetty.server.session.AbstractSession

removeAttribute

public void removeAttribute(String name)
Specified by:
removeAttribute in interface javax.servlet.http.HttpSession
Overrides:
removeAttribute in class org.eclipse.jetty.server.session.AbstractSession

access

protected boolean 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.eclipse.jetty.server.session.AbstractSession

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.eclipse.jetty.server.session.AbstractSession

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 session 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.eclipse.jetty.server.session.AbstractSession

timeout

protected void timeout()
                throws IllegalStateException
Overrides:
timeout in class org.eclipse.jetty.server.session.AbstractSession
Throws:
IllegalStateException

willPassivate

public void willPassivate()
Overrides:
willPassivate in class org.eclipse.jetty.server.session.AbstractSession

didActivate

public void didActivate()
Overrides:
didActivate in class org.eclipse.jetty.server.session.AbstractSession

getClusterId

public String getClusterId()
Overrides:
getClusterId in class org.eclipse.jetty.server.session.AbstractSession

getNodeId

public String getNodeId()
Overrides:
getNodeId in class org.eclipse.jetty.server.session.AbstractSession

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.