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

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

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

Implements HttpSession from the javax.servlet package.

See Also:
Serialized Form

Field Summary
protected  long _accessed
           
protected  java.util.Map<java.lang.String,java.lang.Object> _attributes
           
protected  java.lang.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  java.lang.String _nodeId
           
protected  int _requests
           
 
Constructor Summary
protected AbstractSessionManager.Session(javax.servlet.http.HttpServletRequest request)
           
protected AbstractSessionManager.Session(long created, long accessed, java.lang.String clusterId)
           
 
Method Summary
protected  void access(long time)
           
protected  void bindValue(java.lang.String name, java.lang.Object value)
          If value implements HttpSessionBindingListener, call valueBound()
protected  void complete()
           
protected  void cookieSet()
           
protected  void didActivate()
           
protected  void doInvalidate()
           
 java.lang.Object getAttribute(java.lang.String name)
           
 java.util.Enumeration getAttributeNames()
           
protected  java.lang.String getClusterId()
           
 long getCookieSetTime()
           
 long getCreationTime()
           
 java.lang.String getId()
           
 long getLastAccessedTime()
           
 int getMaxInactiveInterval()
           
protected  java.lang.String getNodeId()
           
 javax.servlet.ServletContext getServletContext()
           
 AbstractSessionManager.Session getSession()
           
 javax.servlet.http.HttpSessionContext getSessionContext()
          Deprecated.  
 java.lang.Object getValue(java.lang.String name)
          Deprecated. As of Version 2.2, this method is replaced by getAttribute(java.lang.String)
 java.lang.String[] getValueNames()
          Deprecated. As of Version 2.2, this method is replaced by getAttributeNames()
 void invalidate()
           
 boolean isIdChanged()
           
 boolean isNew()
           
protected  boolean isNotAvailable()
           
protected  boolean isValid()
           
 void putValue(java.lang.String name, java.lang.Object value)
          Deprecated. As of Version 2.2, this method is replaced by setAttribute(java.lang.String, java.lang.Object)
 void removeAttribute(java.lang.String name)
           
 void removeValue(java.lang.String name)
          Deprecated. As of Version 2.2, this method is replaced by removeAttribute(java.lang.String)
 void setAttribute(java.lang.String name, java.lang.Object value)
           
 void setIdChanged(boolean changed)
           
 void setMaxInactiveInterval(int secs)
           
protected  void timeout()
           
 java.lang.String toString()
           
protected  void unbindValue(java.lang.String name, java.lang.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 java.lang.String _clusterId

_nodeId

protected final java.lang.String _nodeId

_attributes

protected final java.util.Map<java.lang.String,java.lang.Object> _attributes

_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

_requests

protected int _requests
Constructor Detail

AbstractSessionManager.Session

protected AbstractSessionManager.Session(javax.servlet.http.HttpServletRequest request)

AbstractSessionManager.Session

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

isNotAvailable

protected boolean isNotAvailable()
Returns:
True is the session is invalid or passivated.

getSession

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

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Specified by:
getAttribute in interface javax.servlet.http.HttpSession

getAttributeNames

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

getCookieSetTime

public long getCookieSetTime()

getCreationTime

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

getId

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

getNodeId

protected java.lang.String getNodeId()

getClusterId

protected java.lang.String getClusterId()

getLastAccessedTime

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

getMaxInactiveInterval

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

getServletContext

public javax.servlet.ServletContext getServletContext()
Specified by:
getServletContext in interface javax.servlet.http.HttpSession

getSessionContext

@Deprecated
public javax.servlet.http.HttpSessionContext getSessionContext()
                                                        throws java.lang.IllegalStateException
Deprecated. 

Specified by:
getSessionContext in interface javax.servlet.http.HttpSession
Throws:
java.lang.IllegalStateException

getValue

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

Specified by:
getValue in interface javax.servlet.http.HttpSession
Throws:
java.lang.IllegalStateException

getValueNames

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

Specified by:
getValueNames in interface javax.servlet.http.HttpSession
Throws:
java.lang.IllegalStateException

access

protected void access(long time)

complete

protected void complete()

timeout

protected void timeout()
                throws java.lang.IllegalStateException
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

doInvalidate

protected void doInvalidate()
                     throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

isIdChanged

public boolean isIdChanged()

isNew

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

putValue

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

Specified by:
putValue in interface javax.servlet.http.HttpSession
Throws:
java.lang.IllegalStateException

removeAttribute

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

removeValue

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

Specified by:
removeValue in interface javax.servlet.http.HttpSession
Throws:
java.lang.IllegalStateException

setAttribute

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

setIdChanged

public void setIdChanged(boolean changed)

setMaxInactiveInterval

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

bindValue

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


isValid

protected boolean isValid()

cookieSet

protected void cookieSet()

unbindValue

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


willPassivate

protected void willPassivate()

didActivate

protected void didActivate()


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