TROCustomSessionManager
From RemObjects Software
This is a RemObjects SDK Architecture entry
Feel free to add your notes to this topic below.
Overview
TROCustomSessionManager forms the base class of all session managers provided by RemObjects SDK, and can also be used as the base class for implementing your own special session manager.
File
- uROSessions
Declaration
TROCustomSessionManager = class(TROComponent, IROSessionsChangesNotifier);
Hierarchy
- TROComponent
- TROCustomSessionManager
Properties
| | | |
|---|---|---|
| Clearing | Boolean | |
| Critical | TCriticalSection | |
| MaxSessions | Integer | Specifies the maximum number of sessions that will be allowed. -1 (the default) indicates that no limit on number of sessions will be enforced.
Allowing a server to run without enforcing any limit on the number of sessions might pose a security risk, as malicious clients could theoretically start an infinite number of sessions by performing repeated requests with changing Client IDs, until server memory is depleted. You should make sure to either set a limit, or tie session creation to user authentication, so that only valid client users can obtain a session(and possibly only one session per login). |
| SessionDuration | Integer | The time, in minutes, that sessions will persist before timing out (default is 15 minutes).The timeout for each individual session will be reset every time the session is accessed; after SessionDuration minutes have passed without access to the session, it will be discarded.
The exact handling of the timeout processing depends on the implementation of the specific session manager, which might check session timeouts at intervals. Therefore, sessions might live slightly longer then the specified timeout. |
Methods
| | |
|---|---|
| CheckSessionIsExpired | |
| ClearSessions | Discards all sessions within the session manager, so that any new call from a client will start with a fresh session. |
| CreateSession | |
| DeleteSession | |
| GetAllSessions | Returns a string list containing the IDs of all currently active sessions.
Depending on the session manager and on your application architecture, this list can be huge, especially when using a database based session list that is shared by a large server farm. Obtaining the full list of sessions can be a costly process. |
| GetSessionCount | |
| ReleaseSession |
See Also
Product: RemObjects SDK
Current version: RemObjects SDK 'Vinci' (5.0)
Lists — Glossary — Features — How To — Components — Tools — Samples — Articles — Architecture — Issues
Categories: Text | RemObjects SDK | Architecture | Class | Component | Delphi
