TROOlympiaEventRepository

Overview

The TROOlympiaEventRepository class implements an event repository that stores event data in the Olympia server. The Active property has to be set to true to activate the TROOlympiaEventRepository.

Location


 

constructor Create  override

Standard component constructor

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner

Active

Activates the SessionManager and EventReceiver with the 'OlympiaEvents' event handler.

property Active: Boolean read write

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

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

CheckProperties  override

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

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.

Login  protected

If the Username is not empty, login to the IOlympia singleton is possible with the given Username and Password. If the Username is empty, the server channel is activated without username and password check.

procedure Login

Logout  protected

Delegates a call to the IOlympia singleton.

procedure Logout

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

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)

Password

Used when Username is not empty. Username with Password is used to login to the IOlympia singleton. Valid Username/Password pairs are defined in the Olympia settings. See Olympia for more details.

property Password: string read write

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:


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

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

SessionManager

The session manager that maintains the server's user session. 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: TROOlympiaSessionManager read write

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

Username

The Username with its Password is used to login to the IOlympia singleton.

property Username: string read write

 

Active

Activates the SessionManager and EventReceiver with the 'OlympiaEvents' event handler.

property Active: Boolean read write

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

Password

Used when Username is not empty. Username with Password is used to login to the IOlympia singleton. Valid Username/Password pairs are defined in the Olympia settings. See Olympia for more details.

property Password: string read write

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

SessionManager

The session manager that maintains the server's user session. 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: TROOlympiaSessionManager read write

Username

The Username with its Password is used to login to the IOlympia singleton.

property Username: string read write

 

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

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

CheckProperties  override

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

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.

Login  protected

If the Username is not empty, login to the IOlympia singleton is possible with the given Username and Password. If the Username is empty, the server channel is activated without username and password check.

procedure Login

Logout  protected

Delegates a call to the IOlympia singleton.

procedure Logout

Notification  protected override

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:


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)