RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAbstractWebSession Class

TAbstractWebSession is the base class for objects that represent a session in a WebSnap application.

Pascal
TAbstractWebSession = class(TObject);
C++
class TAbstractWebSession : public TObject;

HTTPApp

TAbstractWebSession is the base class for all Web session objects. These include active sessions, which are represented by TWebSession objects, and invalid sessions (TInvalidWebSession), which are used to represent sessions that can no longer be used because they have expired. 

A Web session has an ID and a list of name/value pairs. The ID is a random number that uniquely identifies the session. The name/value pairs are used to associate information with the ID. The values are variants. You can use these named Variants to store application-defined information that is associated with a single user. In this way, the information can persist over multiple calls from the same user. 

The session ID is stored on the end user's computer using a cookie. When a request is received, the WebSnap application examines the cookie. If a session associated with this cookie exists, then it becomes the current session. 

There is no need to instantiate session objects. A Session is created automatically when the WebSnap application receives an HTTP request message.  

When the current session is terminated, its session ID and name/value pairs are discarded. For example, the current session is typically terminated when the user logs out. Sessions can also be terminated when they are not accessed within a specified time-out period, or when the application explicitly calls the session's Terminate method. A new session is created after a session has been terminated. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!