Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Servlet Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::HttpSession

Package:  Servlet


rwsf::HttpSession rwsf::HandleBase

Local Index

Members

Header File

#include <rwsf/servlet/http/HttpSession.h>

Description

rwsf::HttpSession provides a convenient interface for maintaining state across HTTP requests. The class allows access to information about a session, such as when the session was created and when the session was last accessed.

Each session object contains a unique session ID. The session ID is stored in a client's browser using either a cookie or by rewriting the URL to include the session ID. When the client submits a new request to the servlet, the Agent uses the session ID to automatically associate the saved session with the new request.

A session represents state as a collection of rwsf::Attribute objects. Each attribute is associated with an attribute name.

A listener can register interest in session events such as when new attributes are added, or when a session is invalidated or times out. For more information on receiving session events, see rwsf::HttpSessionListener.

Table 4 lists methods that are either non-standard or not supported at this release.

Table 4: rwsf::HttpSession deviation from Servlet Specification

Member Description of Difference from Servlet Specification

setFromCookie()

added method

setFromURL()

added method

Public Constructors

HttpSession();
HttpSession(const rwsf::HttpSession& second);

Public Destructor

virtual
~HttpSession();

Public Member Operators

rwsf::HttpSession&
operator=(const rwsf::HttpSession& second);

Public Member Functions

rwsf::Attribute
getAttribute(const std::string& name) const;
rwsf::Enumeration<std::string>
getAttributeNames() const;
rwsf::DateTime
getCreationTime() const;
std::string
getId() const;
rwsf::DateTime
getLastAccessedTime() const;
int
getMaxInactiveInterval() const;
rwsf::ServletContext
getServletContext() const;
void
invalidate();
bool
isNew() const;
virtual bool
isValid() const;
rwsf::Attribute
removeAttribute(const std::string& name);
void
setAttribute(const std::string& name,
             const rwsf::Attribute& value);
void
setFromCookie();
void
setFromURL();
void
setMaxInactiveInterval(int interval);

See Also

rwsf::HttpServletRequest

rwsf::HttpSessionEvent

rwsf::HttpSessionListener

rwsf::Attribute

rwsf::ServletContext



Previous fileTop of DocumentContentsIndex pageNext file

©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.