TROInMemoryEventRepository
Overview
TROInMemoryEventRepository implements an event repository that stores event data in local memory.
Location
- Unit: uROEventRepository.pas
- Ancestry: TComponent | TROComponent | TROEventRepository | TROInMemoryEventRepository
constructor Create override
Standard component constructor
constructor Create(aOwner: TComponent)
Parameters:
- aOwner: Owner
AddActiveListener deprecated (declared in TROEventRepository)
Registers aSessionID
as an event sink with an aActiveEventServer
instance of the IROActiveEventServer as an event dispatcher.
function AddActiveListener(aSessionID: TGUID; aActiveEventServer: IROActiveEventServer): Boolean
Parameters:
- aSessionID: Unique session GUID
- aActiveEventServer: Custom event dispatcher
AddSession (TGUID) overload (declared in TROEventRepository)
Performs registration of a given session.
procedure AddSession(aSessionID: TGUID)
Parameters:
- aSessionID: Session ID
AddSession (TGUID, IROActiveEventServer) overload (declared in TROEventRepository)
Performs registration of a given session and event dispatcher.
procedure AddSession(aSessionID: TGUID; aActiveEventServer: IROActiveEventServer)
Parameters:
- aSessionID: Unique session GUID
- aActiveEventServer: Custom event dispatcher
AddSession (TGUID, IROActiveEventServer, string) overload (declared in TROEventRepository)
Performs registration of a given session and event dispatcher.
procedure AddSession(aSessionID: TGUID; aActiveEventServer: IROActiveEventServer; aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aActiveEventServer: Custom event dispatcher
- aEventSinkId: Event sink
AddSession (TGUID, string) overload (declared in TROEventRepository)
Performs registration of a given session.
procedure AddSession(aSessionID: TGUID; aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aEventSinkId: Event sink
Assign override (declared in TROEventRepository)
Copies the contents of another, similar object.
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
CheckProperties virtual (declared in TROEventRepository)
Validates the event repository properties.
procedure CheckProperties
Critical protected
Critical section
property Critical: TCriticalSection read
DoAddSession (TGUID, IROActiveEventServer, string) protected override
Performs registration of a given session and event dispatcher.
procedure DoAddSession(aSessionID: TGUID; aActiveEventServer: IROActiveEventServer; const aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aActiveEventServer: Custom event dispatcher
- aEventSinkId: Event sink
DoAddSession (TGUID, string) protected overload virtual (declared in TROEventRepository)
Performs registration of a given session.
procedure DoAddSession(aSessionID: TGUID; const aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aEventSinkId: Event sink
DoGetEventData protected virtual (declared in TROEventRepository)
Retrieves data of an event for a given session.
function DoGetEventData(SessionID: TGUID; var TargetStream: TROBinaryMemoryStream): Integer
Parameters:
- SessionID: Unique session GUID
- TargetStream: Event data container
DoGetEventData2 protected override
Retrieves data of an event for a given session.
function DoGetEventData2(SessionID: TGUID; out Target: TROEventDataArray; aMaxEvents: Integer; out aEventsLeft: Integer): Integer
Parameters:
- SessionID: Session ID
- Target: Array of events
- aMaxEvents: Max possible count of eventsMax count of events per request
- aEventsLeft: Rest of events
DoRemoveSession protected override
Removes a given session from the list of registered sessions.
procedure DoRemoveSession(aSessionID: TGUID; const aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aEventSinkId: Event sink
DoStoreEventData protected override
Stores event data from a given session.
procedure DoStoreEventData(SourceSessionID: TGUID; Data: TROBinaryMemoryStream; const ExcludeSender: Boolean; const ExcludeSessionList: Boolean; const SessionList: string; const EventSinkId: string)
Parameters:
- SourceSessionID: Unique session GUID
- Data: Event data container
- ExcludeSender: If true, the
SourceSessionID
will be excluded from the destination list. - ExcludeSessionList: If true, the
SessionList
will be used as an exclusion list, otherwise as an inclusion list. - SessionList: Comma delimited list of session GUIDs
- EventSinkId: Event sink
FindSession protected
Finds session
function FindSession(aSessionID: TGUID): TROSessionReference
Parameters:
- aSessionID: Session ID
GetEventData (declared in TROEventRepository)
Implements IROEventRepository to retrieve data of events for a given session via %#DoGetEventData%.
function GetEventData(SessionID: TGUID; var TargetStream: TROBinaryMemoryStream): Integer
Parameters:
- SessionID: Session ID
- TargetStream: Target stream
GetEventData2 (declared in TROEventRepository)
Implements IROEventRepository to retrieve data of events for a given session via %#DoGetEventData2%.
function GetEventData2(SessionID: TGUID; out Target: TROEventDataArray; aMaxEvents: Integer; out aEventsLeft: Integer): Integer
Parameters:
- SessionID: Session ID
- Target: Array of events
- aMaxEvents: Max count of events per request
- aEventsLeft: Rest of events
GetEventDataEx (declared in TROEventRepository)
Retrieves data of events for a given session.
procedure GetEventDataEx(SessionID: TGUID; out Target: TROEventDataArray)
Parameters:
- SessionID: Session ID
- Target: Array of events
GetEventWriter (declared in TROEventRepository)
Retrieves an event proxy registered by the generated RODL Files.
function GetEventWriter(const IID: TGUID): IROEventWriter
Parameters:
- IID: GUID of the required interface
IsSessionPresentinSessionManager protected (declared in TROEventRepository)
Checks given session id in SessionManager
function IsSessionPresentinSessionManager(const aSessionID: TGUID): Boolean
Parameters:
- aSessionID: Session ID.
Message (declared in TROEventRepository)
The message format used to encode event data. This must match the message format used on the client-side TROEventReceiver.
property Message: TROMessage read write
Notification protected override (declared in TROEventRepository)
Forwards notification messages to all owned components.
procedure Notification(aComponent: TComponent; Operation: TOperation)
Parameters:
- aComponent: component
- Operation: operation
OnAfterAddSession (declared in TROEventRepository)
Fired by AddSession after addition.
property OnAfterAddSession: TROSessionEvent read write
delegate: procedure OnAfterAddSession(Sender: TROEventRepository; const SessionID: TGUID)
OnAfterRemoveSession (declared in TROEventRepository)
Fired by RemoveSession after removing.
property OnAfterRemoveSession: TROSessionEvent read write
delegate: procedure OnAfterRemoveSession(Sender: TROEventRepository; const SessionID: TGUID)
OnBeforeAddSession (declared in TROEventRepository)
Fired by AddSession before addition.
property OnBeforeAddSession: TROSessionEvent read write
delegate: procedure OnBeforeAddSession(Sender: TROEventRepository; const SessionID: TGUID)
OnBeforeRemoveSession (declared in TROEventRepository)
Fired by RemoveSession before removing.
property OnBeforeRemoveSession: TROSessionEvent read write
delegate: procedure OnBeforeRemoveSession(Sender: TROEventRepository; const SessionID: TGUID)
RemoveSession (TGUID) overload (declared in TROEventRepository)
Removes a given session from the list of registered sessions.
procedure RemoveSession(aSessionID: TGUID)
Parameters:
- aSessionID: Session ID
RemoveSession (TGUID, string) overload (declared in TROEventRepository)
Removes a given session from the list of registered sessions.
procedure RemoveSession(aSessionID: TGUID; aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aEventSinkId: Event sink
RemoveSessionActiveListener protected override
Removes session active listener.
procedure RemoveSessionActiveListener(Sender: TObject; aSessionID: TGUID)
Parameters:
- Sender: IROActiveEventServer instance
- aSessionID: Session ID
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
SessionIDs protected
List of Session ID
property SessionIDs: TStringList read
SessionManager (declared in TROEventRepository)
The session manager that maintains the server's user sessions. Remoting SDK events are tied to user sessions. Fired events are stored in the session until delivered to clients, while undelivered events expire and are discarded when the session expires. Therefore, to function, every Event Repository must have a session manager assigned.
property SessionManager: TROCustomSessionManager read write
SessionReferenceCount
Count of session references
property SessionReferenceCount: Integer read
SessionReferences
Returns session reference
property SessionReferences[Index: Integer]: TROSessionReference read
StoreEventData (declared in TROEventRepository)
Stores the provided event data in the repository.
procedure StoreEventData(SourceSessionID: TGUID; Data: TROBinaryMemoryStream; const ExcludeSender: Boolean; const ExcludeSessionList: Boolean; const SessionList: string; const EventSinkId: string)
Parameters:
- SourceSessionID: Session ID
- Data: Event data container
- ExcludeSender: If true, the
SourceSessionID
will be excluded from the destination list. - ExcludeSessionList: If true, the
SessionList
will be used as an exclusion list, otherwise as an inclusion list. - SessionList: Comma delimited list of session GUIDs
- EventSinkId: Event sink
Critical protected
Critical section
property Critical: TCriticalSection read
Message (declared in TROEventRepository)
The message format used to encode event data. This must match the message format used on the client-side TROEventReceiver.
property Message: TROMessage read write
SessionIDs protected
List of Session ID
property SessionIDs: TStringList read
SessionManager (declared in TROEventRepository)
The session manager that maintains the server's user sessions. Remoting SDK events are tied to user sessions. Fired events are stored in the session until delivered to clients, while undelivered events expire and are discarded when the session expires. Therefore, to function, every Event Repository must have a session manager assigned.
property SessionManager: TROCustomSessionManager read write
SessionReferenceCount
Count of session references
property SessionReferenceCount: Integer read
SessionReferences
Returns session reference
property SessionReferences[Index: Integer]: TROSessionReference read
constructor Create override
Standard component constructor
constructor Create(aOwner: TComponent)
Parameters:
- aOwner: Owner
AddActiveListener deprecated (declared in TROEventRepository)
Registers aSessionID
as an event sink with an aActiveEventServer
instance of the IROActiveEventServer as an event dispatcher.
function AddActiveListener(aSessionID: TGUID; aActiveEventServer: IROActiveEventServer): Boolean
Parameters:
- aSessionID: Unique session GUID
- aActiveEventServer: Custom event dispatcher
AddSession (TGUID) overload (declared in TROEventRepository)
Performs registration of a given session.
procedure AddSession(aSessionID: TGUID)
Parameters:
- aSessionID: Session ID
AddSession (TGUID, IROActiveEventServer) overload (declared in TROEventRepository)
Performs registration of a given session and event dispatcher.
procedure AddSession(aSessionID: TGUID; aActiveEventServer: IROActiveEventServer)
Parameters:
- aSessionID: Unique session GUID
- aActiveEventServer: Custom event dispatcher
AddSession (TGUID, IROActiveEventServer, string) overload (declared in TROEventRepository)
Performs registration of a given session and event dispatcher.
procedure AddSession(aSessionID: TGUID; aActiveEventServer: IROActiveEventServer; aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aActiveEventServer: Custom event dispatcher
- aEventSinkId: Event sink
AddSession (TGUID, string) overload (declared in TROEventRepository)
Performs registration of a given session.
procedure AddSession(aSessionID: TGUID; aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aEventSinkId: Event sink
Assign override (declared in TROEventRepository)
Copies the contents of another, similar object.
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
CheckProperties virtual (declared in TROEventRepository)
Validates the event repository properties.
procedure CheckProperties
DoAddSession (TGUID, IROActiveEventServer, string) protected override
Performs registration of a given session and event dispatcher.
procedure DoAddSession(aSessionID: TGUID; aActiveEventServer: IROActiveEventServer; const aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aActiveEventServer: Custom event dispatcher
- aEventSinkId: Event sink
DoAddSession (TGUID, string) protected overload virtual (declared in TROEventRepository)
Performs registration of a given session.
procedure DoAddSession(aSessionID: TGUID; const aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aEventSinkId: Event sink
DoGetEventData protected virtual (declared in TROEventRepository)
Retrieves data of an event for a given session.
function DoGetEventData(SessionID: TGUID; var TargetStream: TROBinaryMemoryStream): Integer
Parameters:
- SessionID: Unique session GUID
- TargetStream: Event data container
DoGetEventData2 protected override
Retrieves data of an event for a given session.
function DoGetEventData2(SessionID: TGUID; out Target: TROEventDataArray; aMaxEvents: Integer; out aEventsLeft: Integer): Integer
Parameters:
- SessionID: Session ID
- Target: Array of events
- aMaxEvents: Max possible count of eventsMax count of events per request
- aEventsLeft: Rest of events
DoRemoveSession protected override
Removes a given session from the list of registered sessions.
procedure DoRemoveSession(aSessionID: TGUID; const aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aEventSinkId: Event sink
DoStoreEventData protected override
Stores event data from a given session.
procedure DoStoreEventData(SourceSessionID: TGUID; Data: TROBinaryMemoryStream; const ExcludeSender: Boolean; const ExcludeSessionList: Boolean; const SessionList: string; const EventSinkId: string)
Parameters:
- SourceSessionID: Unique session GUID
- Data: Event data container
- ExcludeSender: If true, the
SourceSessionID
will be excluded from the destination list. - ExcludeSessionList: If true, the
SessionList
will be used as an exclusion list, otherwise as an inclusion list. - SessionList: Comma delimited list of session GUIDs
- EventSinkId: Event sink
FindSession protected
Finds session
function FindSession(aSessionID: TGUID): TROSessionReference
Parameters:
- aSessionID: Session ID
GetEventData (declared in TROEventRepository)
Implements IROEventRepository to retrieve data of events for a given session via %#DoGetEventData%.
function GetEventData(SessionID: TGUID; var TargetStream: TROBinaryMemoryStream): Integer
Parameters:
- SessionID: Session ID
- TargetStream: Target stream
GetEventData2 (declared in TROEventRepository)
Implements IROEventRepository to retrieve data of events for a given session via %#DoGetEventData2%.
function GetEventData2(SessionID: TGUID; out Target: TROEventDataArray; aMaxEvents: Integer; out aEventsLeft: Integer): Integer
Parameters:
- SessionID: Session ID
- Target: Array of events
- aMaxEvents: Max count of events per request
- aEventsLeft: Rest of events
GetEventDataEx (declared in TROEventRepository)
Retrieves data of events for a given session.
procedure GetEventDataEx(SessionID: TGUID; out Target: TROEventDataArray)
Parameters:
- SessionID: Session ID
- Target: Array of events
GetEventWriter (declared in TROEventRepository)
Retrieves an event proxy registered by the generated RODL Files.
function GetEventWriter(const IID: TGUID): IROEventWriter
Parameters:
- IID: GUID of the required interface
IsSessionPresentinSessionManager protected (declared in TROEventRepository)
Checks given session id in SessionManager
function IsSessionPresentinSessionManager(const aSessionID: TGUID): Boolean
Parameters:
- aSessionID: Session ID.
Notification protected override (declared in TROEventRepository)
Forwards notification messages to all owned components.
procedure Notification(aComponent: TComponent; Operation: TOperation)
Parameters:
- aComponent: component
- Operation: operation
RemoveSession (TGUID) overload (declared in TROEventRepository)
Removes a given session from the list of registered sessions.
procedure RemoveSession(aSessionID: TGUID)
Parameters:
- aSessionID: Session ID
RemoveSession (TGUID, string) overload (declared in TROEventRepository)
Removes a given session from the list of registered sessions.
procedure RemoveSession(aSessionID: TGUID; aEventSinkId: string)
Parameters:
- aSessionID: Session ID
- aEventSinkId: Event sink
RemoveSessionActiveListener protected override
Removes session active listener.
procedure RemoveSessionActiveListener(Sender: TObject; aSessionID: TGUID)
Parameters:
- Sender: IROActiveEventServer instance
- aSessionID: Session ID
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
StoreEventData (declared in TROEventRepository)
Stores the provided event data in the repository.
procedure StoreEventData(SourceSessionID: TGUID; Data: TROBinaryMemoryStream; const ExcludeSender: Boolean; const ExcludeSessionList: Boolean; const SessionList: string; const EventSinkId: string)
Parameters:
- SourceSessionID: Session ID
- Data: Event data container
- ExcludeSender: If true, the
SourceSessionID
will be excluded from the destination list. - ExcludeSessionList: If true, the
SessionList
will be used as an exclusion list, otherwise as an inclusion list. - SessionList: Comma delimited list of session GUIDs
- EventSinkId: Event sink
OnAfterAddSession (declared in TROEventRepository)
Fired by AddSession after addition.
property OnAfterAddSession: TROSessionEvent read write
delegate: procedure OnAfterAddSession(Sender: TROEventRepository; const SessionID: TGUID)
OnAfterRemoveSession (declared in TROEventRepository)
Fired by RemoveSession after removing.
property OnAfterRemoveSession: TROSessionEvent read write
delegate: procedure OnAfterRemoveSession(Sender: TROEventRepository; const SessionID: TGUID)
OnBeforeAddSession (declared in TROEventRepository)
Fired by AddSession before addition.
property OnBeforeAddSession: TROSessionEvent read write
delegate: procedure OnBeforeAddSession(Sender: TROEventRepository; const SessionID: TGUID)
OnBeforeRemoveSession (declared in TROEventRepository)
Fired by RemoveSession before removing.
property OnBeforeRemoveSession: TROSessionEvent read write
delegate: procedure OnBeforeRemoveSession(Sender: TROEventRepository; const SessionID: TGUID)