Declaration¶
Source position: httpdefs.pp line 658
type
TCustomSession = class(TComponent)
public
constructor Create;
procedure InitSession;
procedure InitResponse;
procedure UpdateResponse;
procedure RemoveVariable;
procedure RegenerateSessionID;
procedure Terminate;
function SessionVariableExists : Boolean;
property TimeOutMinutes: Integer; {rwd}
property SessionID: string; {r}
property SessionCookie: string; {rw}
property SessionCookiePath: string; {rw}
property Variables[VarName : string]: string; {rw}
property SessionState: TSessionStates; {r}
property OnSessionStateChange: TNotifyEvent; {rw}
property SecureSession: Boolean; {rwd}
property SameSitePolicy: TSameSite; {rwd}
end;
Inheritance¶
Description¶
TCustomSession provides the foundation for HTTP session management functionality. It handles session initialization, variable management, state tracking, and cleanup operations.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| SameSitePolicy | public | |
| SecureSession | public | |
| SessionCookie | public | Name of the cookie used to store session ID |
| SessionCookiePath | public | Path attribute for the session cookie |
| SessionID read only | public | Unique identifier for the session |
| SessionState read only | public | Current state of the session |
| TimeOutMinutes | public | Session timeout period in minutes |
| Variables | public | Access to session variables by name |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Create | public | Creates a new session instance |
| InitResponse | public | Initializes the HTTP response for the session |
| InitSession | public | Initializes the session from HTTP request |
| RegenerateSessionID | public | |
| RemoveVariable | public | Removes a variable from the session |
| SessionVariableExists | public | Checks if a session variable exists |
| Terminate | public | Terminates and invalidates the session |
| UpdateResponse | public | Updates the HTTP response with session information |
Events¶
| Member | Visibility | Description |
|---|---|---|
| OnSessionStateChange | public | Event triggered when session state changes |