TROInMemoryEventRepository

Overview

TROInMemoryEventRepository implements an event repository that stores event data in local memory.

Location


 

constructor Create  override

Standard component constructor

constructor Create(aOwner: TComponent)

Parameters:

  • aOwner: Owner

AddActiveListener  override

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 override

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

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 an event for a given session via DoGetEventData.

function GetEventData(SessionID: TGUID; var TargetStream: TROBinaryMemoryStream): Integer

Parameters:

  • SessionID: Session ID
  • TargetStream: Target stream

GetEventDataEx    (declared in TROEventRepository)

procedure GetEventDataEx(SessionID: TGUID; out Target: TROEventDataArray)

Parameters:

  • SessionID:
  • Target:

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 virtual

Removes session active listener.

procedure RemoveSessionActiveListener(Sender: TObject; aSessionID: TGUID)

Parameters:

  • Sender: Sender
  • 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

SessionsChangedNotification  protected

A callback that informs about events (TROSessionsActions) related to the aSessionID.

procedure SessionsChangedNotification(const aSessionID: TGUID; aSessionAction: TROSessionsActions; Sender: TObject)

Parameters:


StoreEventData (TGUID, TROBinaryMemoryStream, Boolean, Boolean, string)  overload    (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)

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

StoreEventData (TGUID, TROBinaryMemoryStream, Boolean, Boolean, string, string)  overload    (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  override

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 override

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

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 an event for a given session via DoGetEventData.

function GetEventData(SessionID: TGUID; var TargetStream: TROBinaryMemoryStream): Integer

Parameters:

  • SessionID: Session ID
  • TargetStream: Target stream

GetEventDataEx    (declared in TROEventRepository)

procedure GetEventDataEx(SessionID: TGUID; out Target: TROEventDataArray)

Parameters:

  • SessionID:
  • Target:

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 virtual

Removes session active listener.

procedure RemoveSessionActiveListener(Sender: TObject; aSessionID: TGUID)

Parameters:

  • Sender: Sender
  • 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

SessionsChangedNotification  protected

A callback that informs about events (TROSessionsActions) related to the aSessionID.

procedure SessionsChangedNotification(const aSessionID: TGUID; aSessionAction: TROSessionsActions; Sender: TObject)

Parameters:


StoreEventData (TGUID, TROBinaryMemoryStream, Boolean, Boolean, string)  overload    (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)

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

StoreEventData (TGUID, TROBinaryMemoryStream, Boolean, Boolean, string, string)  overload    (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)