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

rwsf::HttpSession

Group:  Servlet


rwsf::HttpSessionrwsf::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.

The following table lists methods that are either non-standard or not supported at this release.

setFromCookie()

added method

setFromURL()

added method

Public Constructors

HttpSession();
HttpSession(const HttpSession & second);

Public Destructors

virtual
~HttpSession();

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;
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);

Public Operators

HttpSession &
operator=(const HttpSession & s);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.