Acme.Serve
Class Serve.AcmeSession

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by Acme.Serve.Serve.AcmeSession
All Implemented Interfaces:
Serializable, Cloneable, Map, javax.servlet.http.HttpSession
Enclosing class:
Serve

public static class Serve.AcmeSession
extends Hashtable
implements javax.servlet.http.HttpSession

Http session support

TODO: provide lazy session restoring, it should allow to load classes from wars 1st step it read serialization data and store under session attribute 2nd when the session requested, it tries to deserialize all session attributes considered that all classes available

See Also:
Serialized Form

Method Summary
 Object getAttribute(String name)
           
 Enumeration getAttributeNames()
           
 long getCreationTime()
           
 String getId()
           
 long getLastAccessedTime()
           
 int getMaxInactiveInterval()
           
 javax.servlet.ServletContext getServletContext()
          Returns the ServletContext to which this session belongs.
 javax.servlet.http.HttpSessionContext getSessionContext()
          Deprecated.  
 Object getValue(String name)
           
 String[] getValueNames()
           
 void invalidate()
           
 boolean isNew()
           
 void putValue(String name, Object value)
           
 void removeAttribute(String name)
           
 void removeValue(String name)
           
 void setAttribute(String name, Object value)
           
 void setListeners(List l)
           
 void setMaxInactiveInterval(int interval)
           
 void setServletContext(javax.servlet.ServletContext sc)
          something hack, to update servlet context since session created out of scope
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getCreationTime

public long getCreationTime()
Specified by:
getCreationTime in interface javax.servlet.http.HttpSession

getId

public String getId()
Specified by:
getId in interface javax.servlet.http.HttpSession

getLastAccessedTime

public long getLastAccessedTime()
Specified by:
getLastAccessedTime in interface javax.servlet.http.HttpSession

setMaxInactiveInterval

public void setMaxInactiveInterval(int interval)
Specified by:
setMaxInactiveInterval in interface javax.servlet.http.HttpSession

getMaxInactiveInterval

public int getMaxInactiveInterval()
Specified by:
getMaxInactiveInterval in interface javax.servlet.http.HttpSession

getSessionContext

public javax.servlet.http.HttpSessionContext getSessionContext()
Deprecated. 

Specified by:
getSessionContext in interface javax.servlet.http.HttpSession

getServletContext

public javax.servlet.ServletContext getServletContext()
Returns the ServletContext to which this session belongs.

Specified by:
getServletContext in interface javax.servlet.http.HttpSession
Returns:
The ServletContext object for the web application

getAttribute

public Object getAttribute(String name)
                    throws IllegalStateException
Specified by:
getAttribute in interface javax.servlet.http.HttpSession
Throws:
IllegalStateException

getValue

public Object getValue(String name)
                throws IllegalStateException
Specified by:
getValue in interface javax.servlet.http.HttpSession
Throws:
IllegalStateException

getAttributeNames

public Enumeration getAttributeNames()
                              throws IllegalStateException
Specified by:
getAttributeNames in interface javax.servlet.http.HttpSession
Throws:
IllegalStateException

getValueNames

public String[] getValueNames()
                       throws IllegalStateException
Specified by:
getValueNames in interface javax.servlet.http.HttpSession
Throws:
IllegalStateException

setAttribute

public void setAttribute(String name,
                         Object value)
                  throws IllegalStateException
Specified by:
setAttribute in interface javax.servlet.http.HttpSession
Throws:
IllegalStateException

putValue

public void putValue(String name,
                     Object value)
              throws IllegalStateException
Specified by:
putValue in interface javax.servlet.http.HttpSession
Throws:
IllegalStateException

removeAttribute

public void removeAttribute(String name)
                     throws IllegalStateException
Specified by:
removeAttribute in interface javax.servlet.http.HttpSession
Throws:
IllegalStateException

removeValue

public void removeValue(String name)
                 throws IllegalStateException
Specified by:
removeValue in interface javax.servlet.http.HttpSession
Throws:
IllegalStateException

invalidate

public void invalidate()
                throws IllegalStateException
Specified by:
invalidate in interface javax.servlet.http.HttpSession
Throws:
IllegalStateException

isNew

public boolean isNew()
              throws IllegalStateException
Specified by:
isNew in interface javax.servlet.http.HttpSession
Throws:
IllegalStateException

setListeners

public void setListeners(List l)

setServletContext

public void setServletContext(javax.servlet.ServletContext sc)
something hack, to update servlet context since session created out of scope

Parameters:
sc -


Copyright © 2011. All Rights Reserved.