org.mortbay.jetty.servlet
Class AbstractSessionManager.Session

java.lang.Object
  extended by org.mortbay.jetty.servlet.AbstractSessionManager.Session
All Implemented Interfaces:
HttpSession, SessionManager.Session
Direct Known Subclasses:
HashSessionManager.Session
Enclosing class:
AbstractSessionManager

public abstract class AbstractSessionManager.Session
extends Object
implements SessionManager.Session


Field Summary
(package private)  long _accessed
           
(package private)  long _created
           
(package private)  String _id
           
(package private)  boolean _invalid
           
(package private)  long _maxIdleMs
           
(package private)  boolean _newSession
           
(package private)  Map _values
           
 
Constructor Summary
protected AbstractSessionManager.Session(HttpServletRequest request)
           
 
Method Summary
 void access()
           
private  void bindValue(String name, Object value)
          If value implements HttpSessionBindingListener, call valueBound()
 Object getAttribute(String name)
           
 Enumeration getAttributeNames()
           
 long getCreationTime()
           
 String getId()
           
 long getLastAccessedTime()
           
 int getMaxInactiveInterval()
           
 ServletContext getServletContext()
           
 HttpSessionContext getSessionContext()
          Deprecated.  
 Object getValue(String name)
          Deprecated. As of Version 2.2, this method is replaced by getAttribute(java.lang.String)
 String[] getValueNames()
          Deprecated. As of Version 2.2, this method is replaced by getAttributeNames()
 void invalidate()
           
 boolean isNew()
           
 boolean isValid()
           
protected abstract  Map newAttributeMap()
           
 void putValue(String name, Object value)
          Deprecated. As of Version 2.2, this method is replaced by setAttribute(java.lang.String, java.lang.Object)
 void removeAttribute(String name)
           
 void removeValue(String name)
          Deprecated. As of Version 2.2, this method is replaced by removeAttribute(java.lang.String)
 void setAttribute(String name, Object value)
           
 void setMaxInactiveInterval(int secs)
           
 String toString()
           
private  void unbindValue(String name, Object value)
          If value implements HttpSessionBindingListener, call valueUnbound()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_created

long _created

_accessed

long _accessed

_id

String _id

_invalid

boolean _invalid

_maxIdleMs

long _maxIdleMs

_newSession

boolean _newSession

_values

Map _values
Constructor Detail

AbstractSessionManager.Session

protected AbstractSessionManager.Session(HttpServletRequest request)
Method Detail

access

public void access()
Specified by:
access in interface SessionManager.Session

bindValue

private void bindValue(String name,
                       Object value)
If value implements HttpSessionBindingListener, call valueBound()


getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface HttpSession

getAttributeNames

public Enumeration getAttributeNames()
Specified by:
getAttributeNames in interface HttpSession

getCreationTime

public long getCreationTime()
                     throws IllegalStateException
Specified by:
getCreationTime in interface HttpSession
Throws:
IllegalStateException

getId

public String getId()
             throws IllegalStateException
Specified by:
getId in interface HttpSession
Throws:
IllegalStateException

getLastAccessedTime

public long getLastAccessedTime()
                         throws IllegalStateException
Specified by:
getLastAccessedTime in interface HttpSession
Throws:
IllegalStateException

getMaxInactiveInterval

public int getMaxInactiveInterval()
Specified by:
getMaxInactiveInterval in interface HttpSession

getServletContext

public ServletContext getServletContext()
Specified by:
getServletContext in interface HttpSession

getSessionContext

public HttpSessionContext getSessionContext()
                                     throws IllegalStateException
Deprecated. 

Specified by:
getSessionContext in interface HttpSession
Throws:
IllegalStateException

getValue

public Object getValue(String name)
                throws IllegalStateException
Deprecated. As of Version 2.2, this method is replaced by getAttribute(java.lang.String)

Specified by:
getValue in interface HttpSession
Throws:
IllegalStateException

getValueNames

public String[] getValueNames()
                       throws IllegalStateException
Deprecated. As of Version 2.2, this method is replaced by getAttributeNames()

Specified by:
getValueNames in interface HttpSession
Throws:
IllegalStateException

invalidate

public void invalidate()
                throws IllegalStateException
Specified by:
invalidate in interface HttpSession
Throws:
IllegalStateException

isNew

public boolean isNew()
              throws IllegalStateException
Specified by:
isNew in interface HttpSession
Throws:
IllegalStateException

isValid

public boolean isValid()
Specified by:
isValid in interface SessionManager.Session

newAttributeMap

protected abstract Map newAttributeMap()

putValue

public void putValue(String name,
                     Object value)
              throws IllegalStateException
Deprecated. As of Version 2.2, this method is replaced by setAttribute(java.lang.String, java.lang.Object)

Specified by:
putValue in interface HttpSession
Throws:
IllegalStateException

removeAttribute

public void removeAttribute(String name)
Specified by:
removeAttribute in interface HttpSession

removeValue

public void removeValue(String name)
                 throws IllegalStateException
Deprecated. As of Version 2.2, this method is replaced by removeAttribute(java.lang.String)

Specified by:
removeValue in interface HttpSession
Throws:
IllegalStateException

setAttribute

public void setAttribute(String name,
                         Object value)
Specified by:
setAttribute in interface HttpSession

setMaxInactiveInterval

public void setMaxInactiveInterval(int secs)
Specified by:
setMaxInactiveInterval in interface HttpSession

unbindValue

private void unbindValue(String name,
                         Object value)
If value implements HttpSessionBindingListener, call valueUnbound()


toString

public String toString()
Overrides:
toString in class Object