org.eclipse.jetty.server.session
Class AbstractSessionManager.Session

java.lang.Object
  extended by org.eclipse.jetty.server.session.AbstractSessionManager.Session
All Implemented Interfaces:
Serializable, HttpSession, AbstractSessionManager.SessionIf
Direct Known Subclasses:
HashSessionManager.Session, JDBCSessionManager.Session
Enclosing class:
AbstractSessionManager

public abstract class AbstractSessionManager.Session
extends Object
implements AbstractSessionManager.SessionIf, Serializable

Implements HttpSession from the javax.servlet package.

See Also:
Serialized Form

Field Summary
protected  long _accessed
           
protected  String _clusterId
           
protected  long _cookieSet
           
protected  long _created
           
protected  boolean _doInvalidate
           
protected  boolean _idChanged
           
protected  boolean _invalid
           
protected  long _lastAccessed
           
protected  long _maxIdleMs
           
protected  boolean _newSession
           
protected  String _nodeId
           
protected  int _requests
           
protected  Map _values
           
 
Constructor Summary
protected AbstractSessionManager.Session(HttpServletRequest request)
           
protected AbstractSessionManager.Session(long created, String clusterId)
           
 
Method Summary
protected  void access(long time)
           
protected  void bindValue(String name, Object value)
          If value implements HttpSessionBindingListener, call valueBound()
protected  void complete()
           
protected  void cookieSet()
           
protected  void didActivate()
           
protected  void doInvalidate()
           
 Object getAttribute(String name)
           
 Enumeration getAttributeNames()
           
protected  String getClusterId()
           
 long getCookieSetTime()
           
 long getCreationTime()
           
 String getId()
           
 long getLastAccessedTime()
           
 int getMaxInactiveInterval()
           
protected  String getNodeId()
           
 ServletContext getServletContext()
           
 AbstractSessionManager.Session getSession()
           
 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()
protected  void initValues()
           
 void invalidate()
           
 boolean isIdChanged()
           
 boolean isNew()
           
protected  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 setIdChanged(boolean changed)
           
 void setMaxInactiveInterval(int secs)
           
protected  void timeout()
           
 String toString()
           
protected  void unbindValue(String name, Object value)
          If value implements HttpSessionBindingListener, call valueUnbound()
protected  void willPassivate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_clusterId

protected final String _clusterId

_nodeId

protected final String _nodeId

_idChanged

protected boolean _idChanged

_created

protected final long _created

_cookieSet

protected long _cookieSet

_accessed

protected long _accessed

_lastAccessed

protected long _lastAccessed

_invalid

protected boolean _invalid

_doInvalidate

protected boolean _doInvalidate

_maxIdleMs

protected long _maxIdleMs

_newSession

protected boolean _newSession

_values

protected Map _values

_requests

protected int _requests
Constructor Detail

AbstractSessionManager.Session

protected AbstractSessionManager.Session(HttpServletRequest request)

AbstractSessionManager.Session

protected AbstractSessionManager.Session(long created,
                                         String clusterId)
Method Detail

getSession

public AbstractSessionManager.Session getSession()
Specified by:
getSession in interface AbstractSessionManager.SessionIf

initValues

protected void initValues()

getAttribute

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

getAttributeNames

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

getCookieSetTime

public long getCookieSetTime()

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

getNodeId

protected String getNodeId()

getClusterId

protected String getClusterId()

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

access

protected void access(long time)

complete

protected void complete()

timeout

protected void timeout()
                throws IllegalStateException
Throws:
IllegalStateException

invalidate

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

doInvalidate

protected void doInvalidate()
                     throws IllegalStateException
Throws:
IllegalStateException

isIdChanged

public boolean isIdChanged()

isNew

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

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

setIdChanged

public void setIdChanged(boolean changed)

setMaxInactiveInterval

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

toString

public String toString()
Overrides:
toString in class Object

bindValue

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


isValid

protected boolean isValid()

newAttributeMap

protected abstract Map newAttributeMap()

cookieSet

protected void cookieSet()

unbindValue

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


willPassivate

protected void willPassivate()

didActivate

protected void didActivate()


Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.