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:
java.io.Serializable, java.lang.Cloneable, java.util.Map, javax.servlet.http.HttpSession
Enclosing class:
Serve

public static class Serve.AcmeSession
extends java.util.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
 java.lang.Object getAttribute(java.lang.String name)
           
 java.util.Enumeration getAttributeNames()
           
 long getCreationTime()
           
 java.lang.String getId()
           
 long getLastAccessedTime()
           
 int getMaxInactiveInterval()
           
 javax.servlet.ServletContext getServletContext()
          Returns the ServletContext to which this session belongs.
 javax.servlet.http.HttpSessionContext getSessionContext()
          Deprecated.  
 java.lang.Object getValue(java.lang.String name)
           
 java.lang.String[] getValueNames()
           
 void invalidate()
           
 boolean isNew()
           
 void putValue(java.lang.String name, java.lang.Object value)
           
 void removeAttribute(java.lang.String name)
           
 void removeValue(java.lang.String name)
           
 void setAttribute(java.lang.String name, java.lang.Object value)
           
 void setListeners(java.util.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 java.lang.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 java.lang.Object getAttribute(java.lang.String name)
                              throws java.lang.IllegalStateException
Specified by:
getAttribute in interface javax.servlet.http.HttpSession
Throws:
java.lang.IllegalStateException

getValue

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

getAttributeNames

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

getValueNames

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

setAttribute

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

putValue

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

removeAttribute

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

removeValue

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

invalidate

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

isNew

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

setListeners

public void setListeners(java.util.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 © 2010. All Rights Reserved.