TROEventWriter

Overview

The TROEventWriter is the ancestor classes that are used to send event messages from server to the client. Descendants of the TROEventWriter class are created in the auto-generated _Intf module (see more in Files Generated from RODL) if the event sinks are defined in the RODL library. These descendant classes are used in the repository for dispatching event messages.

You will not usually deal with the TROEventWriter class and its descendants directly; the Remoting SDK invocation framework will use them to execute procedures that are related with server events.

Location


 

constructor Create (IROMessage, Boolean)    (declared in TROEventProxy)

Creates a new TROEventProxy object with the specified message aMessage. If the CloneMessage is true, the constructor creates a copy of the aMessage and saves it in the private variable fMessage. If the CloneMessage is false, the fMessage saves a reference of the aMessage.

constructor Create(const aMessage: IROMessage; aCloneMessage: Boolean)

Parameters:

  • aMessage: Specified message
  • aCloneMessage: When true, a copy of the aMessage will be saved, otherwise a reference to the aMessage will be saved.

constructor Create (IROMessage, IROEventRepository)  reintroduce

Creates a new instance with the specified event message aMessage and the specified repository aRepository.

constructor Create(const aMessage: IROMessage; const aRepository: IROEventRepository)

Parameters:

  • aMessage: Event message.
  • aRepository: Specified repository that will store the event data and additional information.

CloneMessage    (declared in TROEventProxy)

Controls which message instance will be used for remote requests. The value of this property affects TROBaseProxy.__GetMessage behavior, when set to true it will clone the message instance every time before making a remote request. Cloning the message helps to avoid conflicts in multithreaded environment (e.g. when TROEventReceiver is used).

property CloneMessage: Boolean read write

ExcludeSender  protected

Determines the need to use the sender session in the processing of the current event. If ExcludeSender is true (default value), the sender will not receive the event message, if ExcludeSender is false, the sender will receive the event message. For example: In the chat, you can exclude the client sender session from the mailing list.

property ExcludeSender: Boolean read write

ExcludeSessionList  protected

Determines the need to use the SessionList in the processing of the current event. If ExcludeSessionList is false, the SessionList should be used, if ExcludeSessionList is true, the SessionList should not be used.

property ExcludeSessionList: Boolean read write

GetExcludeSessionList  protected

Gets the ExcludeSessionList property.

function GetExcludeSessionList: Boolean

GetSessionList  protected

Gets the SessionList property.

function GetSessionList: TStrings

NewInstance  override    (declared in TROInterfacedObject)

Creates and returns a new instance of the interfaced object, initializing its reference counter with 1.

class function NewInstance: TObject

RefCount    (declared in TROInterfacedObject)

Provides read-only access to the reference counter. When this value reaches zero, the object is freed.

property RefCount: Integer read

Repository  protected

Defines the repository that is associated with the current TROEventWriter object. The Repository is needed to store the event data with additional information.

property Repository: IROEventRepository read

SessionList  protected

Contains the list of the clients (their session GUID) that will receive the event message, if the ExcludeSessionList property equals false. For example: In the chat, the SessionList can contain the list of client sessions that will receive the message from the server.

property SessionList: TStrings read

SetExcludeSessionList  protected

Sets the property ExcludeSessionList with specified Value.

procedure SetExcludeSessionList(const Value: Boolean)

Parameters:

  • Value: False means that the SessionList should be used in the event processing, true that it should not be used.

 

CloneMessage    (declared in TROEventProxy)

Controls which message instance will be used for remote requests. The value of this property affects TROBaseProxy.__GetMessage behavior, when set to true it will clone the message instance every time before making a remote request. Cloning the message helps to avoid conflicts in multithreaded environment (e.g. when TROEventReceiver is used).

property CloneMessage: Boolean read write

ExcludeSender  protected

Determines the need to use the sender session in the processing of the current event. If ExcludeSender is true (default value), the sender will not receive the event message, if ExcludeSender is false, the sender will receive the event message. For example: In the chat, you can exclude the client sender session from the mailing list.

property ExcludeSender: Boolean read write

ExcludeSessionList  protected

Determines the need to use the SessionList in the processing of the current event. If ExcludeSessionList is false, the SessionList should be used, if ExcludeSessionList is true, the SessionList should not be used.

property ExcludeSessionList: Boolean read write

RefCount    (declared in TROInterfacedObject)

Provides read-only access to the reference counter. When this value reaches zero, the object is freed.

property RefCount: Integer read

Repository  protected

Defines the repository that is associated with the current TROEventWriter object. The Repository is needed to store the event data with additional information.

property Repository: IROEventRepository read

SessionList  protected

Contains the list of the clients (their session GUID) that will receive the event message, if the ExcludeSessionList property equals false. For example: In the chat, the SessionList can contain the list of client sessions that will receive the message from the server.

property SessionList: TStrings read

 

NewInstance  override    (declared in TROInterfacedObject)

Creates and returns a new instance of the interfaced object, initializing its reference counter with 1.

class function NewInstance: TObject

 

constructor Create (IROMessage, Boolean)    (declared in TROEventProxy)

Creates a new TROEventProxy object with the specified message aMessage. If the CloneMessage is true, the constructor creates a copy of the aMessage and saves it in the private variable fMessage. If the CloneMessage is false, the fMessage saves a reference of the aMessage.

constructor Create(const aMessage: IROMessage; aCloneMessage: Boolean)

Parameters:

  • aMessage: Specified message
  • aCloneMessage: When true, a copy of the aMessage will be saved, otherwise a reference to the aMessage will be saved.

constructor Create (IROMessage, IROEventRepository)  reintroduce

Creates a new instance with the specified event message aMessage and the specified repository aRepository.

constructor Create(const aMessage: IROMessage; const aRepository: IROEventRepository)

Parameters:

  • aMessage: Event message.
  • aRepository: Specified repository that will store the event data and additional information.

GetExcludeSessionList  protected

Gets the ExcludeSessionList property.

function GetExcludeSessionList: Boolean

GetSessionList  protected

Gets the SessionList property.

function GetSessionList: TStrings

SetExcludeSessionList  protected

Sets the property ExcludeSessionList with specified Value.

procedure SetExcludeSessionList(const Value: Boolean)

Parameters:

  • Value: False means that the SessionList should be used in the event processing, true that it should not be used.