TROInMemoryEventRepository

Overview

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

Location

Implements

 

constructor Create  override

Creates a new instance.

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 write

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

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

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 RO components.

procedure ROFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Disables destruction notification for specified RO component.

procedure RORemoveFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

SessionIDs  protected

List of Session ID

property SessionIDs: TStringList 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

SessionReferenceCount

Count of session references

property SessionReferenceCount: integer read write

SessionReferences

Returns session reference

property SessionReferences[Index: integer]: TROSessionReference read write

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 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

SessionIDs  protected

List of Session ID

property SessionIDs: TStringList 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

SessionReferenceCount

Count of session references

property SessionReferenceCount: integer read write

SessionReferences

Returns session reference

property SessionReferences[Index: integer]: TROSessionReference read write

 

constructor Create  override

Creates a new instance.

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

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.

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 RO components.

procedure ROFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Disables destruction notification for specified RO component.

procedure RORemoveFreeNotification(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)

Descendants

See Also