The TROEventData object represents the data that is associated with the current event. It is used to save and get data about events that were passed from the server to the client.
You will not usually deal with the TROEventData class directly. It is used in the auto-generated _Intf module (see more in Files Generated from RODL) for event sinks defined in the RODL library. To store the event data, the TROEventData object uses the StoreEventData procedure of the IROEventRepository interface. To get the event data, it uses the GetEventData procedure of the IROEventRepository interface.
For example: In the Remoting SDK HTTP Chat sample, the TROEventData class is used to store the data that is associated with the OnLogout event sink:
procedure THTTPChatEvents_Writer.OnLogout(const __Sender : TGUID; const aUserID: UnicodeString); var __eventdata : Binary; begin __eventdata := Binary.Create; try __Message.InitializeEventMessage(NIL, 'HTTPChatLibrary', EID_HTTPChatEvents, 'OnLogout'); __Message.Write('aUserID', TypeInfo(UnicodeString), aUserID, ); __Message.Finalize; __Message.WriteToStream(__eventdata); Repository.StoreEventData(__Sender, __eventdata, ExcludeSender, ExcludeSessionList, SessionList.CommaText); finally __eventdata.Free; end; end;
- Unit: uROServerIntf.pas
- Ancestry: TROEventData
Represents the data that is associated with the current event. The Data property contains the information from the message that was passed from the server to the client. The Data property has a specified format: header and source. The header contains the clients ID, message type and information about the compression of the current message. The source contains the information from the message in encrypted or non-encrypted form.
property Data: TStream read
Creates a new instance, saves the anEventDataStream to the Data property and sets the reference count of the Data property to 1.
constructor Create(anEventDataStream: TMemoryStream)
Increments the reference count of the Data property by 1.
function AddRef: Integer
Decrements the reference count of the Data property by 1.
function RemoveRef: Integer