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

java.lang.Object
  extended by org.eclipse.jetty.server.session.AbstractSession
      extended by org.eclipse.jetty.server.session.JDBCSessionManager.Session
All Implemented Interfaces:
HttpSession, AbstractSessionManager.SessionIf
Enclosing class:
JDBCSessionManager

public class JDBCSessionManager.Session
extends AbstractSession

Session Session instance in memory of this node.


Field Summary
 
Fields inherited from class org.eclipse.jetty.server.session.AbstractSession
_jdbcAttributes
 
Constructor Summary
protected JDBCSessionManager.Session(HttpServletRequest request)
          Session from a request.
protected JDBCSessionManager.Session(long accessed, JDBCSessionManager.SessionData data)
          Session restored in database.
 
Method Summary
protected  boolean access(long time)
          Entry to session.
protected  void complete()
          Exit from session
protected  void cookieSet()
           
 void removeAttribute(String name)
          Removes the object bound with the specified name from this session.
 void setAttribute(String name, Object value)
          Binds an object to this session, using the name specified.
protected  void timeout()
           
 
Methods inherited from class org.eclipse.jetty.server.session.AbstractSession
bindValue, checkValid, clearAttributes, didActivate, doGet, doInvalidate, doPutOrRemove, getAccessed, getAttribute, getAttributeNames, getAttributes, getClusterId, getCookieSetTime, getCreationTime, getId, getLastAccessedTime, getMaxInactiveInterval, getNames, getNodeId, getRequests, getServletContext, getSession, getSessionContext, getValue, getValueNames, invalidate, isIdChanged, isNew, isValid, putValue, removeValue, setIdChanged, setMaxInactiveInterval, setRequests, toString, unbindValue, willPassivate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDBCSessionManager.Session

protected JDBCSessionManager.Session(HttpServletRequest request)
Session from a request.

Parameters:
request -

JDBCSessionManager.Session

protected JDBCSessionManager.Session(long accessed,
                                     JDBCSessionManager.SessionData data)
Session restored in database.

Parameters:
data -
Method Detail

setAttribute

public void setAttribute(String name,
                         Object value)
Description copied from interface: HttpSession
Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.

After this method executes, and if the new object implements HttpSessionBindingListener, the container calls HttpSessionBindingListener.valueBound. The container then notifies any HttpSessionAttributeListeners in the web application.

If an object was already bound to this session of this name that implements HttpSessionBindingListener, its HttpSessionBindingListener.valueUnbound method is called.

If the value passed in is null, this has the same effect as calling removeAttribute().

Specified by:
setAttribute in interface HttpSession
Overrides:
setAttribute in class AbstractSession
Parameters:
name - the name to which the object is bound; cannot be null
value - the object to be bound

removeAttribute

public void removeAttribute(String name)
Description copied from interface: HttpSession
Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.

After this method executes, and if the object implements HttpSessionBindingListener, the container calls HttpSessionBindingListener.valueUnbound. The container then notifies any HttpSessionAttributeListeners in the web application.

Specified by:
removeAttribute in interface HttpSession
Overrides:
removeAttribute in class AbstractSession
Parameters:
name - the name of the object to remove from this session

cookieSet

protected void cookieSet()
Overrides:
cookieSet in class AbstractSession

access

protected boolean access(long time)
Entry to session. Called by SessionHandler on inbound request and the session already exists in this node's memory.

Overrides:
access in class AbstractSession
See Also:
AbstractSession.access(long)

complete

protected void complete()
Exit from session

Overrides:
complete in class AbstractSession
See Also:
AbstractSession.complete()

timeout

protected void timeout()
                throws IllegalStateException
Overrides:
timeout in class AbstractSession
Throws:
IllegalStateException


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