TDADBSessionManager
Overview
TDADBSessionManager implements a session manager that stores session data in a database accessed using Data Abstract. This database can, in theory, be shared by multiple servers, allowing the session state to be accessible across a server farm.
The component works similarly to the TRODBSessionManager shipped with Remoting SDK.
DB script
CREATE TABLE [dbo].[Sessions] (
[SessionID] [char] (38) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Created] [datetime] NULL ,
[LastAccessed] [datetime] NULL ,
[Data] [IMAGE] NULL
)
GO
ALTER TABLE [dbo].[Sessions] WITH NOCHECK ADD
CONSTRAINT [PK_Sessions] PRIMARY KEY CLUSTERED
(
[SessionID]
) ON [PRIMARY]
GO
Required Datasets/Commands:
Name | SQL |
---|---|
ClearSessions | DELETE FROM Sessions WHERE LastAccessed < :LastAccessed |
DeleteSession | DELETE FROM Sessions WHERE SessionID = :SessionID |
GetAllSessionIDs | SELECT * FROM Sessions |
GetSession | SELECT * FROM Sessions WHERE SessionID = :SessionID |
GetSessionCount | SELECT COUNT(*) FROM Sessions |
InsertSession | INSERT INTO Sessions (SessionID, Created, LastAccessed, Data) VALUES ( :SessionID, :Created, :LastAccessed, :Data) |
UpdateSession | UPDATE Sessions SET LastAccessed = :LastAccessed, Data = :Data WHERE SessionID = :SessionID |
Location
- Unit: uDADBSessionManager.pas
- Ancestry: TComponent | TROComponent | TROCustomSessionManager | TDADBSessionManager
constructor Create override
Standard component constructor
constructor Create(AOwner: TComponent)
Parameters:
- AOwner: Owner
Assign override
Copies the contents of another, similar object.
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
AutoTransaction
Controls of using implicit (True
) or explicit (False
) database transactions.
property AutoTransaction: Boolean read write
CheckProperties override
Validates the session manager properties.
procedure CheckProperties
CheckSessionIsExpired (TROSession): Boolean overload (declared in TROCustomSessionManager)
Checks state of given session.
function CheckSessionIsExpired(aSession: TROSession): Boolean
Parameters:
- aSession: Given session.
CheckSessionIsExpired (TGUID): Boolean overload (declared in TROCustomSessionManager)
Checks state of given session or not.
function CheckSessionIsExpired(const aSessionID: TGUID): Boolean
Parameters:
- aSessionID: Session ID
Clearing protected (declared in TROCustomSessionManager)
internal flag that is set when session are clearing
property Clearing: Boolean read
ClearSessions (declared in TROCustomSessionManager)
Discards all sessions within the session manager, so that any new call from a client will start with a fresh session.
procedure ClearSessions(OnlyExpired: Boolean)
Parameters:
- OnlyExpired: process only expired sessions or not.
ClearSessionsCommand
Defines the command that will be used to DELETE all sessions from the database when ClearSessions is called or when the ClearSessionsOnCreate or ClearSessionsOnDestroy properties are set to true.
property ClearSessionsCommand: string read write
ClearSessionsOnCreate
Decides whether the session manager should clear the database of old sessions when the component is created (usually at application startup). Set this property to true if you want your server to start with a clean slate at each startup; keep it to false if you want sessions from previous executions to persist when the server shuts down and is restarted, or if multiple servers will share the same session database.
property ClearSessionsOnCreate: Boolean read write
ClearSessionsOnDestroy
Specifies whether the session manager should clear the database of old sessions when the component is destroyed (usually at application shutdown). Set this property to true if you want your server to leave a clean slate on shutdown; keep it to false if you want sessions from previous executions to persist when the server shuts down and is restarted, or if multiple servers will share the same session database.
property ClearSessionsOnDestroy: Boolean read write
Connection
Sets the name of the connection to the database that contains the session data.
property Connection: string read write
CreateSession (declared in TROCustomSessionManager)
Creates a new session with provided ID.
function CreateSession(const aSessionID: TGUID): TROSession
Parameters:
- aSessionID: Session ID
CreateTimerByRequest protected (declared in TROCustomSessionManager)
Creates internal timer.
procedure CreateTimerByRequest
DeleteSession (declared in TROCustomSessionManager)
Deletes the session with specified ID.
procedure DeleteSession(const aSessionID: TGUID; IsExpired: Boolean)
Parameters:
- aSessionID: Session ID
- IsExpired: current state of session
DeleteSessionCommand
Defines the command that will be used to DELETE sessions from the database when they expire or are explicitly deleted.
property DeleteSessionCommand: string read write
DeleteTemporarySession (declared in TROCustomSessionManager)
Deletes the temporary session.
procedure DeleteTemporarySession(var Session: TROSession)
Parameters:
- Session: given session.
DoClearSessions protected override
Discards all sessions within the session manager, so that any new call from a client will start with a fresh session.
procedure DoClearSessions(OnlyExpired: Boolean)
Parameters:
- OnlyExpired: process only expired sessions or not.
DoConvertGUID protected virtual
Calls to OnConvertGUID (if set) or uses GUIDToString
for getting a text representation of given aGUID
.
function DoConvertGUID(const aGUID: TGUID): string
Parameters:
- aGUID: guid
DoCreateSession protected virtual (declared in TROCustomSessionManager)
Creates a new session with provided ID.
function DoCreateSession(const aSessionID: TGUID): TROSession
Parameters:
- aSessionID: Session ID
DoDeleteSession protected override
Deletes the session with specified ID.
procedure DoDeleteSession(const aSessionID: TGUID; IsExpired: Boolean)
Parameters:
- aSessionID: Session ID
- IsExpired: current state of session
DoFindSession protected override
Finds session with the specified GUID
function DoFindSession(const aSessionID: TGUID; aUpdateTime: Boolean): TROSession
Parameters:
- aSessionID: Session ID.
- aUpdateTime: Update LastAccess of found session or not
DoGetAllSessions protected override
Returns a string list containing the IDs of all currently active sessions.
procedure DoGetAllSessions(Dest: TStringList)
Parameters:
- Dest: destination
DoGetSessionCount protected override
Returns the session count.
function DoGetSessionCount: Integer
DoNotifySessionsChangesListener protected virtual (declared in TROCustomSessionManager)
Notifies attached listeners about changes
procedure DoNotifySessionsChangesListener(const aSessionID: TGUID; aSessionAction: TROSessionsActions; Sender: TObject)
Parameters:
- aSessionID: Session ID
- aSessionAction: action
- Sender: sender
DoReleaseSession protected override
Releases the previously acquired session.
procedure DoReleaseSession(aSession: TROSession; NewSession: Boolean)
Parameters:
- aSession: given session
- NewSession: newly created session or not
DoTimerTick protected virtual (declared in TROCustomSessionManager)
Clears expired sessions.
procedure DoTimerTick(CurrentTickCount: Cardinal)
Parameters:
- CurrentTickCount: ignored
FieldNameCreated
Database field used to store the time and date the session was originally created.
property FieldNameCreated: string read write
FieldNameData
Database field used to store the session data. This must be a BLOB field.
property FieldNameData: string read write
FieldNameLastAccessed
Database field used to store the time and date the session was last accessed.
property FieldNameLastAccessed: string read write
FieldNameSessionID
Database field used to store the session ID. This must be a GUID field, or a string field of 38 characters.
property FieldNameSessionID: string read write
FindSession (declared in TROCustomSessionManager)
Finds session with the specified GUID
function FindSession(const aSessionID: TGUID; aUpdateTime: Boolean): TROSession
Parameters:
- aSessionID: Session ID.
- aUpdateTime: Update LastAccess of found session or not
GetAllSessionIDsDataset
Defines the dataset (data table) that will be used to get the complete list of session IDs from the database.
property GetAllSessionIDsDataset: string read write
GetAllSessions overload (declared in TROCustomSessionManager)
function GetAllSessions: TROSessionIDs
GetAllSessions (TStringList) overload (declared in TROCustomSessionManager)
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.
procedure GetAllSessions(Dest: TStringList)
Parameters:
- Dest: destination
GetSessionCount (declared in TROCustomSessionManager)
Returns the session count.
function GetSessionCount: Integer
GetSessionCountDataSet
Determines the dataset that will be used to get the number of sessions contained in the database.
property GetSessionCountDataSet: string read write
GetSessionDataSet
Specifies the dataset (data table) that will be used to SELECT (i.e. retrieve) sessions from the database, when needed.
property GetSessionDataSet: string read write
InsertSessionCommand
Defines the command that will be used to INSERT new session into the database when it is first created.
property InsertSessionCommand: string read write
IsSessionPresent (declared in TROCustomSessionManager)
function IsSessionPresent(const aSessionID: TGUID): Boolean
Parameters:
- aSessionID:
KillTimer protected (declared in TROCustomSessionManager)
Kills internal timer
procedure KillTimer
LockForReading protected (declared in TROCustomSessionManager)
procedure LockForReading
LockForWriting protected (declared in TROCustomSessionManager)
procedure LockForWriting
MaxSessions (declared in TROCustomSessionManager)
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).
property MaxSessions: Integer read write
Notification protected override
Forwards notification messages to all owned components.
procedure Notification(AComponent: TComponent; Operation: TOperation)
Parameters:
- AComponent: component
- Operation: operation
OnBeforeDeleteSession (declared in TROCustomSessionManager)
Fires before deleting session.
property OnBeforeDeleteSession: TDeleteSessionEvent read write
delegate: procedure OnBeforeDeleteSession(const aSessionID: TGUID; IsExpired: Boolean)
OnConvertGUID
Fires whenever a Session ID is used to access the database, allowing to convert the actual GUIDs used by the Remoting SDK's session management to a different format for storage in a database.
property OnConvertGUID: TDAConvertGUIDEvent read write
delegate: function OnConvertGUID(Sender: TROCustomSessionManager; const aGUID: TGUID): string
OnCustomCreateSession (declared in TROCustomSessionManager)
Fires before the session is created. It allows to return existing session for given session ID
property OnCustomCreateSession: TROCustomSessionCreationEvent read write
delegate: procedure OnCustomCreateSession(const aSessionID: TGUID; var Session: TROSession)
OnException (declared in TROCustomSessionManager)
Fires when an exception is occuring
property OnException: TROSessionExceptionEvent read write
delegate: procedure OnException(aSessionID: TGUID; anException: Exception; var aRetry: Boolean)
OnMaxSessionsReached (declared in TROCustomSessionManager)
Fires when maximum count of allowed sessions is reached
property OnMaxSessionsReached: TROMaxSessionsReachedEvent read write
delegate: procedure OnMaxSessionsReached(var aFail: Boolean)
OnSessionCreated (declared in TROCustomSessionManager)
Gets triggered after a new Session has been created. You can use it to perform initialization functions or fill the session with default values.
property OnSessionCreated: TSessionEvent read write
delegate: procedure OnSessionCreated(const aSession: TROSession)
OnSessionDeleted (declared in TROCustomSessionManager)
Gets triggered after the Session has been deleted. You can use it to perform some finalization functions.
property OnSessionDeleted: TDeleteSessionEvent read write
delegate: procedure OnSessionDeleted(const aSessionID: TGUID; IsExpired: Boolean)
RegisterSessionsChangesListener protected virtual (declared in TROCustomSessionManager)
Attaches a new IROSessionsChangesListener listener.
procedure RegisterSessionsChangesListener(aListener: IROSessionsChangesListener)
Parameters:
- aListener: New listener
ReleaseSession (declared in TROCustomSessionManager)
Releases the previously acquired session.
procedure ReleaseSession(var aSession: TROSession; NewSession: Boolean)
Parameters:
- aSession: given session
- NewSession: newly created session or not
ROFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure ROFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
RORemoveFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure RORemoveFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
Schema
Sets the TDASchema used to access the session data. This is the schema that must define all the GetSessionDataset, InsertSessionCommand, UpdateSessionCommand, DeleteSessionCommand, GetAllSessionIDsDataset and GetSessionCountDataSet tables and commands.
property Schema: TDASchema read write
SendRemoveNotification protected (declared in TROComponent)
Forwards notification messages to all owned components.
procedure SendRemoveNotification(aComponent: TComponent)
Parameters:
- aComponent: component
SessionCheckInterval
Internal for checking session in minutes. default value is 15 minutes.
property SessionCheckInterval: Integer read write
SessionDuration
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.
property SessionDuration: Integer read write
ShouldNotifySessionsChanges protected (declared in TROCustomSessionManager)
function ShouldNotifySessionsChanges: Boolean
StoreAsUTCTimeStamp
Store timestamp as UTC in DB
property StoreAsUTCTimeStamp: Boolean read write
TestLastAccess protected (declared in TROCustomSessionManager)
function TestLastAccess(const aLastAccess: TDateTime): Boolean
Parameters:
- aLastAccess:
UnlockForReading protected (declared in TROCustomSessionManager)
procedure UnlockForReading
UnlockForWriting protected (declared in TROCustomSessionManager)
procedure UnlockForWriting
UnRegisterSessionsChangesListener protected virtual (declared in TROCustomSessionManager)
Detaches a previously attached aListener
.
procedure UnRegisterSessionsChangesListener(aListener: IROSessionsChangesListener)
Parameters:
- aListener: Known listener
UpdateSessionCommand
Defines the command that will be used to UPDATE sessions in the database, whenever they have been touched by the user.
property UpdateSessionCommand: string read write
AutoTransaction
Controls of using implicit (True
) or explicit (False
) database transactions.
property AutoTransaction: Boolean read write
Clearing protected (declared in TROCustomSessionManager)
internal flag that is set when session are clearing
property Clearing: Boolean read
ClearSessionsCommand
Defines the command that will be used to DELETE all sessions from the database when ClearSessions is called or when the ClearSessionsOnCreate or ClearSessionsOnDestroy properties are set to true.
property ClearSessionsCommand: string read write
ClearSessionsOnCreate
Decides whether the session manager should clear the database of old sessions when the component is created (usually at application startup). Set this property to true if you want your server to start with a clean slate at each startup; keep it to false if you want sessions from previous executions to persist when the server shuts down and is restarted, or if multiple servers will share the same session database.
property ClearSessionsOnCreate: Boolean read write
ClearSessionsOnDestroy
Specifies whether the session manager should clear the database of old sessions when the component is destroyed (usually at application shutdown). Set this property to true if you want your server to leave a clean slate on shutdown; keep it to false if you want sessions from previous executions to persist when the server shuts down and is restarted, or if multiple servers will share the same session database.
property ClearSessionsOnDestroy: Boolean read write
Connection
Sets the name of the connection to the database that contains the session data.
property Connection: string read write
DeleteSessionCommand
Defines the command that will be used to DELETE sessions from the database when they expire or are explicitly deleted.
property DeleteSessionCommand: string read write
FieldNameCreated
Database field used to store the time and date the session was originally created.
property FieldNameCreated: string read write
FieldNameData
Database field used to store the session data. This must be a BLOB field.
property FieldNameData: string read write
FieldNameLastAccessed
Database field used to store the time and date the session was last accessed.
property FieldNameLastAccessed: string read write
FieldNameSessionID
Database field used to store the session ID. This must be a GUID field, or a string field of 38 characters.
property FieldNameSessionID: string read write
GetAllSessionIDsDataset
Defines the dataset (data table) that will be used to get the complete list of session IDs from the database.
property GetAllSessionIDsDataset: string read write
GetSessionCountDataSet
Determines the dataset that will be used to get the number of sessions contained in the database.
property GetSessionCountDataSet: string read write
GetSessionDataSet
Specifies the dataset (data table) that will be used to SELECT (i.e. retrieve) sessions from the database, when needed.
property GetSessionDataSet: string read write
InsertSessionCommand
Defines the command that will be used to INSERT new session into the database when it is first created.
property InsertSessionCommand: string read write
MaxSessions (declared in TROCustomSessionManager)
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).
property MaxSessions: Integer read write
Schema
Sets the TDASchema used to access the session data. This is the schema that must define all the GetSessionDataset, InsertSessionCommand, UpdateSessionCommand, DeleteSessionCommand, GetAllSessionIDsDataset and GetSessionCountDataSet tables and commands.
property Schema: TDASchema read write
SessionCheckInterval
Internal for checking session in minutes. default value is 15 minutes.
property SessionCheckInterval: Integer read write
SessionDuration
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.
property SessionDuration: Integer read write
StoreAsUTCTimeStamp
Store timestamp as UTC in DB
property StoreAsUTCTimeStamp: Boolean read write
UpdateSessionCommand
Defines the command that will be used to UPDATE sessions in the database, whenever they have been touched by the user.
property UpdateSessionCommand: string read write
constructor Create override
Standard component constructor
constructor Create(AOwner: TComponent)
Parameters:
- AOwner: Owner
Assign override
Copies the contents of another, similar object.
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
CheckProperties override
Validates the session manager properties.
procedure CheckProperties
CheckSessionIsExpired (TROSession): Boolean overload (declared in TROCustomSessionManager)
Checks state of given session.
function CheckSessionIsExpired(aSession: TROSession): Boolean
Parameters:
- aSession: Given session.
CheckSessionIsExpired (TGUID): Boolean overload (declared in TROCustomSessionManager)
Checks state of given session or not.
function CheckSessionIsExpired(const aSessionID: TGUID): Boolean
Parameters:
- aSessionID: Session ID
ClearSessions (declared in TROCustomSessionManager)
Discards all sessions within the session manager, so that any new call from a client will start with a fresh session.
procedure ClearSessions(OnlyExpired: Boolean)
Parameters:
- OnlyExpired: process only expired sessions or not.
CreateSession (declared in TROCustomSessionManager)
Creates a new session with provided ID.
function CreateSession(const aSessionID: TGUID): TROSession
Parameters:
- aSessionID: Session ID
CreateTimerByRequest protected (declared in TROCustomSessionManager)
Creates internal timer.
procedure CreateTimerByRequest
DeleteSession (declared in TROCustomSessionManager)
Deletes the session with specified ID.
procedure DeleteSession(const aSessionID: TGUID; IsExpired: Boolean)
Parameters:
- aSessionID: Session ID
- IsExpired: current state of session
DeleteTemporarySession (declared in TROCustomSessionManager)
Deletes the temporary session.
procedure DeleteTemporarySession(var Session: TROSession)
Parameters:
- Session: given session.
DoClearSessions protected override
Discards all sessions within the session manager, so that any new call from a client will start with a fresh session.
procedure DoClearSessions(OnlyExpired: Boolean)
Parameters:
- OnlyExpired: process only expired sessions or not.
DoConvertGUID protected virtual
Calls to OnConvertGUID (if set) or uses GUIDToString
for getting a text representation of given aGUID
.
function DoConvertGUID(const aGUID: TGUID): string
Parameters:
- aGUID: guid
DoCreateSession protected virtual (declared in TROCustomSessionManager)
Creates a new session with provided ID.
function DoCreateSession(const aSessionID: TGUID): TROSession
Parameters:
- aSessionID: Session ID
DoDeleteSession protected override
Deletes the session with specified ID.
procedure DoDeleteSession(const aSessionID: TGUID; IsExpired: Boolean)
Parameters:
- aSessionID: Session ID
- IsExpired: current state of session
DoFindSession protected override
Finds session with the specified GUID
function DoFindSession(const aSessionID: TGUID; aUpdateTime: Boolean): TROSession
Parameters:
- aSessionID: Session ID.
- aUpdateTime: Update LastAccess of found session or not
DoGetAllSessions protected override
Returns a string list containing the IDs of all currently active sessions.
procedure DoGetAllSessions(Dest: TStringList)
Parameters:
- Dest: destination
DoGetSessionCount protected override
Returns the session count.
function DoGetSessionCount: Integer
DoNotifySessionsChangesListener protected virtual (declared in TROCustomSessionManager)
Notifies attached listeners about changes
procedure DoNotifySessionsChangesListener(const aSessionID: TGUID; aSessionAction: TROSessionsActions; Sender: TObject)
Parameters:
- aSessionID: Session ID
- aSessionAction: action
- Sender: sender
DoReleaseSession protected override
Releases the previously acquired session.
procedure DoReleaseSession(aSession: TROSession; NewSession: Boolean)
Parameters:
- aSession: given session
- NewSession: newly created session or not
DoTimerTick protected virtual (declared in TROCustomSessionManager)
Clears expired sessions.
procedure DoTimerTick(CurrentTickCount: Cardinal)
Parameters:
- CurrentTickCount: ignored
FindSession (declared in TROCustomSessionManager)
Finds session with the specified GUID
function FindSession(const aSessionID: TGUID; aUpdateTime: Boolean): TROSession
Parameters:
- aSessionID: Session ID.
- aUpdateTime: Update LastAccess of found session or not
GetAllSessions overload (declared in TROCustomSessionManager)
function GetAllSessions: TROSessionIDs
GetAllSessions (TStringList) overload (declared in TROCustomSessionManager)
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.
procedure GetAllSessions(Dest: TStringList)
Parameters:
- Dest: destination
GetSessionCount (declared in TROCustomSessionManager)
Returns the session count.
function GetSessionCount: Integer
IsSessionPresent (declared in TROCustomSessionManager)
function IsSessionPresent(const aSessionID: TGUID): Boolean
Parameters:
- aSessionID:
KillTimer protected (declared in TROCustomSessionManager)
Kills internal timer
procedure KillTimer
LockForReading protected (declared in TROCustomSessionManager)
procedure LockForReading
LockForWriting protected (declared in TROCustomSessionManager)
procedure LockForWriting
Notification protected override
Forwards notification messages to all owned components.
procedure Notification(AComponent: TComponent; Operation: TOperation)
Parameters:
- AComponent: component
- Operation: operation
RegisterSessionsChangesListener protected virtual (declared in TROCustomSessionManager)
Attaches a new IROSessionsChangesListener listener.
procedure RegisterSessionsChangesListener(aListener: IROSessionsChangesListener)
Parameters:
- aListener: New listener
ReleaseSession (declared in TROCustomSessionManager)
Releases the previously acquired session.
procedure ReleaseSession(var aSession: TROSession; NewSession: Boolean)
Parameters:
- aSession: given session
- NewSession: newly created session or not
ROFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure ROFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
RORemoveFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure RORemoveFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
SendRemoveNotification protected (declared in TROComponent)
Forwards notification messages to all owned components.
procedure SendRemoveNotification(aComponent: TComponent)
Parameters:
- aComponent: component
ShouldNotifySessionsChanges protected (declared in TROCustomSessionManager)
function ShouldNotifySessionsChanges: Boolean
TestLastAccess protected (declared in TROCustomSessionManager)
function TestLastAccess(const aLastAccess: TDateTime): Boolean
Parameters:
- aLastAccess:
UnlockForReading protected (declared in TROCustomSessionManager)
procedure UnlockForReading
UnlockForWriting protected (declared in TROCustomSessionManager)
procedure UnlockForWriting
UnRegisterSessionsChangesListener protected virtual (declared in TROCustomSessionManager)
Detaches a previously attached aListener
.
procedure UnRegisterSessionsChangesListener(aListener: IROSessionsChangesListener)
Parameters:
- aListener: Known listener
OnBeforeDeleteSession (declared in TROCustomSessionManager)
Fires before deleting session.
property OnBeforeDeleteSession: TDeleteSessionEvent read write
delegate: procedure OnBeforeDeleteSession(const aSessionID: TGUID; IsExpired: Boolean)
OnConvertGUID
Fires whenever a Session ID is used to access the database, allowing to convert the actual GUIDs used by the Remoting SDK's session management to a different format for storage in a database.
property OnConvertGUID: TDAConvertGUIDEvent read write
delegate: function OnConvertGUID(Sender: TROCustomSessionManager; const aGUID: TGUID): string
OnCustomCreateSession (declared in TROCustomSessionManager)
Fires before the session is created. It allows to return existing session for given session ID
property OnCustomCreateSession: TROCustomSessionCreationEvent read write
delegate: procedure OnCustomCreateSession(const aSessionID: TGUID; var Session: TROSession)
OnException (declared in TROCustomSessionManager)
Fires when an exception is occuring
property OnException: TROSessionExceptionEvent read write
delegate: procedure OnException(aSessionID: TGUID; anException: Exception; var aRetry: Boolean)
OnMaxSessionsReached (declared in TROCustomSessionManager)
Fires when maximum count of allowed sessions is reached
property OnMaxSessionsReached: TROMaxSessionsReachedEvent read write
delegate: procedure OnMaxSessionsReached(var aFail: Boolean)
OnSessionCreated (declared in TROCustomSessionManager)
Gets triggered after a new Session has been created. You can use it to perform initialization functions or fill the session with default values.
property OnSessionCreated: TSessionEvent read write
delegate: procedure OnSessionCreated(const aSession: TROSession)
OnSessionDeleted (declared in TROCustomSessionManager)
Gets triggered after the Session has been deleted. You can use it to perform some finalization functions.
property OnSessionDeleted: TDeleteSessionEvent read write
delegate: procedure OnSessionDeleted(const aSessionID: TGUID; IsExpired: Boolean)