TROServerMultiMessage

Overview

TROServerMultiMessage is a component which allows you to use different types of messages with non-HTTP servers at the same time. It contains a list of supported messages and can autodetect incoming message type.

Location

 

constructor Create  reintroduce overload virtual    (declared in TROMessage)

Creates a new instance.

constructor Create

constructor Create (TComponent)  overload override    (declared in TROMessage)

Creates a new instance.

constructor Create(aOwner: TComponent)

Parameters:

  • aOwner: Owner.

constructor CreateRefCountedClone  virtual    (declared in TROMessage)

constructor CreateRefCountedClone(iMessage: TROMessage)

Parameters:

  • iMessage:

AddServerExceptionPrefix    (declared in TROMessage)

property AddServerExceptionPrefix: boolean read write

ApplyAttributes2  protected virtual    (declared in TROMessage)

Sets SOAP attributes (SOAP message only)

procedure ApplyAttributes2

ApplyAttributes2_Transport  protected virtual    (declared in TROMessage)

Sets transport related attributes (SOAP message only)

procedure ApplyAttributes2_Transport(aTransport: IROTransport)

Parameters:


Assign  override

Copies the contents of another, similar object.

procedure Assign(iSource: TPersistent)

Parameters:

  • iSource: Instance whose properties will be copied

CheckForEnvelope    (declared in TROMessage)

Checks stream for envelope

class function CheckForEnvelope(aStream: TStream; var aEnvelopeName: string): boolean

Parameters:

  • aStream: stream
  • aEnvelopeName: envelope's name if found.

CheckProperties  override

Validates the message properties.

procedure CheckProperties

ClientID    (declared in TROMessage)

Contains the Client ID for the message. Client IDs are used by the Remoting SDK for Session Management and to uniquely identify individual client on the server, for example by the Per-Client Class Factory or in your own custom code. Generally, you will not need to assign or read this value; the framework will automatically create a new unique client ID whenever a message object is instantiated on the client. However, you do have the option to read and write the ClientID property manually, for example to persist a specific client ID between shutdown and restart of your application.

property ClientID: TGuid read write

Clone  protected virtual    (declared in TROMessage)

Makes a shallow copy of this instance.

function Clone: IROMessage

CreateException  protected    (declared in TROMessage)

function CreateException(const aExceptionName: string; const aMessage: string): Exception

Parameters:

  • aExceptionName:
  • aMessage:

CreateSerializer  protected override

Creates the required serializer object.

function CreateSerializer: TROSerializer

DefaultMessage  protected

function DefaultMessage: IROMessage

DefaultMessageIndex

The message index which will be used by default. It's used when the server sends events with a TROEventRepository.

property DefaultMessageIndex: integer read write

DefaultNamespaces    (declared in TROMessage)

property DefaultNamespaces: string read write

EndWriteException  protected    (declared in TROMessage)

Performs finalization work after exception was written.

procedure EndWriteException(aStream: TStream)

Parameters:

  • aStream: stream

Envelopes    (declared in TROMessage)

Envelopes collection.

property Envelopes: TROMessageEnvelopeCollection read write

Envelopes_ProcessIncoming  protected    (declared in TROMessage)

Processes incoming envelopes.

procedure Envelopes_ProcessIncoming(aStream: TStream)

Parameters:

  • aStream: incoming stream

Envelopes_ProcessOutgoing  protected    (declared in TROMessage)

Processes outgoing envelopes.

procedure Envelopes_ProcessOutgoing(aStream: TStream)

Parameters:

  • aStream: outgoing stream

Finalize  protected override

Ensures that the message content is complete before sending it by performing all necessary final processing. This method is called after all parameters have been written to a message and before the message will be sent. It should perform all necessary wrap-up to ensure that a subsequent call to WriteToStream will produce a complete message.

procedure Finalize

FreeStream  protected override

Destroys stream

procedure FreeStream

GetModuleInfo  protected virtual    (declared in TROMessage)

Fills the aStream with RODL data and designates its format in aTransport and aFormat.

procedure GetModuleInfo(aStream: TStream; const aTransport: IROTransport; var aFormat: TDataFormat)

Parameters:

  • aStream:
  • aTransport:
  • aFormat:

GetRodlInfo (TStream, IROTransport, TDataFormat)  protected overload    (declared in TROMessage)

Fills the aStream with RODL data and designates its format in aTransport and aFormat.

procedure GetRodlInfo(aStream: TStream; const aTransport: IROTransport; var aFormat: TDataFormat)

Parameters:

  • aStream: Stream
  • aTransport: Transport channel
  • aFormat: Format

GetSerializer  protected override

function GetSerializer: TROSerializer

HasEnvelope    (declared in TROMessage)

class function HasEnvelope(const aData: array of Byte): Boolean

Parameters:

  • aData:

Initialize (IROTransport, string, string, string, TMessageType)  protected override

Initializes the message with the given parameters.

procedure Initialize(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string; aType: TMessageType)

Parameters:


Initialize (IROTransport, string, string, TMessageType)  protected override

Initializes the message with the given parameters.

procedure Initialize(const aTransport: IROTransport; const anInterfaceName: string; const aMessageName: string; aType: TMessageType)

Parameters:


InitializeEventMessage  protected    (declared in TROMessage)

Initializes an Event message with the given parameters.

procedure InitializeEventMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeExceptionMessage  protected virtual    (declared in TROMessage)

Initializes an Exception message with the given parameters.

procedure InitializeExceptionMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeRead  protected override

Performs additional initialization before reading.

procedure InitializeRead(const aTransport: IROTransport)

Parameters:


InitializeRequestMessage  protected    (declared in TROMessage)

Initializes a mtRequest message with the given parameters.

procedure InitializeRequestMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeResponseMessage  protected    (declared in TROMessage)

Initializes a mtResponse message with the given parameters.

procedure InitializeResponseMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitObject  protected override

Initializes message.

procedure InitObject

InterfaceName    (declared in TROMessage)

Holds the name of the interface (Service) that this message is calling.

property InterfaceName: string read write

IsValidMessage  override

Validates content of message. Used for detection of message type (soap, bin, json, etc)

function IsValidMessage(aData: Pointer; aLength: Integer): boolean

Parameters:

  • aData: data for checking
  • aLength: lenght of data

MessageMatchingTargetUri    (declared in TROMessage)

Creates a client message with type matching the provided target Uri. F.e. for provided uri supertcp://192.168.1.100:7020/bin this method will return an instance of the TROBinMessage class.

class function MessageMatchingTargetUri(const aUri: TROUri): TROMessage

Parameters:

  • aUri: Server Uri

MessageMatchingTargetUrl    (declared in TROMessage)

class function MessageMatchingTargetUrl(const aUrl: string): TROMessage

Parameters:

  • aUrl:

MessageName    (declared in TROMessage)

The name of the method that this message is calling. This property is set by the Remoting SDK framework, and you will not usually change it manually. However, you might want to evaluate it for logging purposes or security checks, in the events of TROTransportChannel or Server.

property MessageName: string read write

OnAfterProcessIncomingEnvelopes    (declared in TROMessage)

Fires after incoming envelopes were processed

property OnAfterProcessIncomingEnvelopes: TStreamOperation read write
delegate: procedure OnAfterProcessIncomingEnvelopes(aStream: TStream)

OnAfterProcessOutgoingEnvelopes    (declared in TROMessage)

Fires after outgoing envelopes were processed

property OnAfterProcessOutgoingEnvelopes: TStreamOperation read write
delegate: procedure OnAfterProcessOutgoingEnvelopes(aStream: TStream)

OnBeforeProcessIncomingEnvelopes    (declared in TROMessage)

Fires before incoming envelopes were processed

property OnBeforeProcessIncomingEnvelopes: TStreamOperation read write
delegate: procedure OnBeforeProcessIncomingEnvelopes(aStream: TStream)

OnBeforeProcessOutgoingEnvelopes    (declared in TROMessage)

Fires before outgoing evvelopes were processed

property OnBeforeProcessOutgoingEnvelopes: TStreamOperation read write
delegate: procedure OnBeforeProcessOutgoingEnvelopes(aStream: TStream)

OnFinalizeMessage    (declared in TROMessage)

Fires as a message object is getting finalized, to send a new request or response. This happens after the entire message has been generated, all parameters have been added, and the message is ready to be sent off over the network.

property OnFinalizeMessage: TROFinalizeMessageEvent read write
delegate: procedure OnFinalizeMessage(Sender: TROMessage)

OnInitializeMessage    (declared in TROMessage)

Fires as a message object is getting initialized, to send a new request or response. This happens after the basic message options are set, but before any parameters or data have been stored in the message.

property OnInitializeMessage: TROInitializeMessageEvent read write
delegate: procedure OnInitializeMessage(Sender: TROMessage; const aTransport: IROTransport; const anInterfaceName: string; const aMessageName: string)

OnReadFromStream    (declared in TROMessage)

Fires before the message is read from the stream that was received over the network. You can use this event to inspect the received stream, or to make manual modifications to it, for example to apply any custom decryption to the message stream before it is processed.

property OnReadFromStream: TStreamOperation read write
delegate: procedure OnReadFromStream(aStream: TStream)

OnReadMessageParameter    (declared in TROMessage)

Fires after an individual message parameter has been read from the received message. The event call will include information about the name and type of the parameter, as well as an untyped pointer to the data. Use this event handler to inspect or log the parameters that are received. In theory, it is also possible to modify the value parameter using the DataRef pointer, but this should be done with extreme caution.

property OnReadMessageParameter: TROReadMessageParameterEvent read write
delegate: procedure OnReadMessageParameter(Sender: TROMessage; const aName: string; aTypeInfo: PTypeInfo; const DataRef: pointer; Attributes: TParamAttributes)

OnServerException    (declared in TROMessage)

Fires if an exception message is received from the server. Use this event handler to provide a single point of interception to be notified of all exceptions raised on the server. In contrast to the TROTransportChannel's OnException event, this event will not fire for communication errors or local exceptions during the processing of a request, but only for exceptions that truly originated on the server.

property OnServerException: TROServerExceptionEvent read write
delegate: procedure OnServerException(anException: Exception; var RaiseException: boolean)

OnWriteException    (declared in TROMessage)

Fires after an exception message was written to the stream that will be sent over the network. This event will fire in addition to (and before) the OnWriteToStream event. You can use this event to inspect the exception message or the outgoing stream.

property OnWriteException: TROWriteExceptionEvent read write
delegate: procedure OnWriteException(Sender: TROMessage; aStream: TStream; E: Exception)

OnWriteMessageParameter    (declared in TROMessage)

Fires before an individual message parameter will be written to the outgoing message. The event call will include information about the name and type of the parameter, as well as an untyped pointer to the data.

property OnWriteMessageParameter: TROWriteMessageParameterEvent read write
delegate: procedure OnWriteMessageParameter(Sender: TROMessage; const aName: string; aTypeInfo: PTypeInfo; const DataRef: pointer; Attributes: TParamAttributes)

OnWriteToStream    (declared in TROMessage)

Fires after the message was written to the stream that will be sent over the network. You can use this event to inspect the outgoing stream, or to make manual modifications to it, e.g. to apply any custom encryption to the message stream before it is sent off.

property OnWriteToStream: TStreamOperation read write
delegate: procedure OnWriteToStream(aStream: TStream)

ProcessException  protected    (declared in TROMessage)

procedure ProcessException

Read  protected override

The general method to read any data.

procedure Read(const aName: string; aTypeInfo: PTypeInfo; var Ptr: ; Attributes: TParamAttributes)

Parameters:

  • aName: Name of the object to read.
  • aTypeInfo: Runtime type information for the data to read.
  • Ptr: Output parameter, should point to the deserialized instance.
  • Attributes: Set of TParamAttribute

ReadArray  protected    (declared in TROMessage)

Reads an array value.

function ReadArray(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBinary  protected    (declared in TROMessage)

Reads a Binary value.

procedure ReadBinary(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDateTime  protected    (declared in TROMessage)

Reads a TDateTime value.

procedure ReadDateTime(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDecimal  protected    (declared in TROMessage)

Reads a Decimal value.

procedure ReadDecimal(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDouble  protected    (declared in TROMessage)

Reads a Double value.

procedure ReadDouble(const aName: string; aFloatType: TFloatType; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • aFloatType: Specifies the exact floating point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadEnumerated  protected    (declared in TROMessage)

Reads an enumerated value.

procedure ReadEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • anEnumTypeInfo: Runtime type information for the enuymerated type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadException  protected override

Reads the exception data from the incoming message and creates the exception object accordingly.

function ReadException: Exception

ReadFromStream (TStream)  protected override

Reads the contents of the message from the given stream.

procedure ReadFromStream(aStream: TStream)

Parameters:

  • aStream: stream

ReadFromStream (TStream, Boolean)  protected override

Reads the contents of the message from the given stream.

procedure ReadFromStream(aStream: TStream; var aFreeStream: Boolean)

Parameters:

  • aStream: stream
  • aFreeStream: free stream

ReadGuid  protected    (declared in TROMessage)

Reads a GUID value.

procedure ReadGuid(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt64  protected    (declared in TROMessage)

Reads a Int64 value.

procedure ReadInt64(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInteger  protected    (declared in TROMessage)

Reads a Integer value (32 bits or less).

procedure ReadInteger(const aName: string; anOrdType: TOrdType; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • anOrdType: Specifies the exact integer point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadLegacyString  protected    (declared in TROMessage)

Reads a legacy string (AnsiString or UTF8String) value.

procedure ReadLegacyString(const aName: string; var Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: integer; iMaxLength: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ExtraAttributes: specified what string should be read (AnsiString or UTF8String)
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • iMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadStruct  protected    (declared in TROMessage)

Reads a Struct value.

function ReadStruct(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadUnicodeString  protected    (declared in TROMessage)

Reads a UnicodeString value.

procedure ReadUnicodeString(const aName: string; var Ref: ; ArrayElementId: integer; iMaxLength: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • iMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadVariant  protected    (declared in TROMessage)

Reads a Variant value.

procedure ReadVariant(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadXml  protected    (declared in TROMessage)

Reads a XML value.

procedure ReadXml(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReferenceCounted  protected    (declared in TROMessage)

property ReferenceCounted: boolean read write

RODLReader    (declared in TROMessage)

property RODLReader: TROCustomRODLReader read write

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

Serializer    (declared in TROMessage)

Returns object that is used for serializing/deserializing any type of data

property Serializer: TROSerializer read write

SetAttributes  protected virtual    (declared in TROMessage)

Sets additional information.

procedure SetAttributes(aTransport: IROTransport; const aNames: array of string; const aValues: array of string)

Parameters:

  • aTransport: Transport channel
  • aNames:
  • aValues:

SetAutoGeneratedNamespaces  protected    (declared in TROMessage)

procedure SetAutoGeneratedNamespaces(aValue: string)

Parameters:

  • aValue:

SetDefaultNamespaces  protected    (declared in TROMessage)

procedure SetDefaultNamespaces(aValue: string)

Parameters:

  • aValue:

StoreAttributes2  protected    (declared in TROMessage)

stores SOAP attributes (SOAP message only)

procedure StoreAttributes2(const aNames: array of string; const aValues: array of string)

Parameters:

  • aNames:
  • aValues:

SupportedMessages

Contains a list of supported messages.

property SupportedMessages: TROServerMultiMessageCollection read write

UnsetAttributes  protected virtual    (declared in TROMessage)

Clears additional information.

procedure UnsetAttributes(aTransport: IROTransport)

Parameters:

  • aTransport: Transport channel

UnsetAttributes2  protected virtual    (declared in TROMessage)

Clears additional information.

procedure UnsetAttributes2

UnsetAttributes2_Transport  protected virtual    (declared in TROMessage)

Clears additional information.

procedure UnsetAttributes2_Transport(aTransport: IROTransport)

Parameters:

  • aTransport: Transport channel

Write  protected override

Writes the value of the aName parameter from Ptr with the given aTypeInfo and ExtraAttributes to the message.

procedure Write(const aName: string; aTypeInfo: PTypeInfo; const Ptr: ; Attributes: TParamAttributes)

Parameters:

  • aName: Name of the object to write.
  • aTypeInfo: RTI
  • Ptr: Pointer to the source variable
  • Attributes: set of TParamAttribute

WriteArray  protected    (declared in TROMessage)

Writes an array value.

procedure WriteArray(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the object to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteBinary  protected    (declared in TROMessage)

Writes a Binary value.

procedure WriteBinary(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDateTime  protected    (declared in TROMessage)

Writes a TDateTime value.

procedure WriteDateTime(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDecimal  protected    (declared in TROMessage)

Writes a Decimal value.

procedure WriteDecimal(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDouble  protected    (declared in TROMessage)

Writes a Double value.

procedure WriteDouble(const aName: string; aFloatType: TFloatType; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • aFloatType: Specifies the exact floating point data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteEnumerated  protected    (declared in TROMessage)

Writes an enumerated value.

procedure WriteEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • anEnumTypeInfo: Runtime type information of the enumerated type.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteEnvelopeHeader  protected    (declared in TROMessage)

Writes envelope header to outgoing stream.

procedure WriteEnvelopeHeader(aEnvelope: TROMessageEnvelope; AStream: TStream)

Parameters:

  • aEnvelope: envelope
  • AStream: outgoing stream

WriteException  protected override

Writes an Exception value.

procedure WriteException(aStream: TStream; anException: Exception)

Parameters:

  • aStream: Target stream
  • anException: Exception object to write

WriteGuid  protected    (declared in TROMessage)

Writes a GUID value.

procedure WriteGuid(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInt64  protected    (declared in TROMessage)

Writes a Int64 value.

procedure WriteInt64(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInteger  protected    (declared in TROMessage)

Writes a Integer value (32 bits or less).

procedure WriteInteger(const aName: string; anOrdType: TOrdType; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • anOrdType: Specifies the exact integer data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteLegacyString  protected    (declared in TROMessage)

Writes a legacy string (AnsiString or UTF8String) value.

procedure WriteLegacyString(const aName: string; const Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ExtraAttributes: specified what string should be written (AnsiString or UTF8String)
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteStruct  protected    (declared in TROMessage)

Writes a Struct value.

procedure WriteStruct(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteToStream  protected override

Writes the content of the message to aStream.

procedure WriteToStream(aStream: TStream)

Parameters:

  • aStream: stream

WriteUnicodeString  protected    (declared in TROMessage)

Writes a WideString value.

procedure WriteUnicodeString(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteVariant  protected    (declared in TROMessage)

Writes a Variant value to the message.

procedure WriteVariant(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteXml  protected    (declared in TROMessage)

Writes a XML value.

procedure WriteXml(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

 

AddServerExceptionPrefix    (declared in TROMessage)

property AddServerExceptionPrefix: boolean read write

ClientID    (declared in TROMessage)

Contains the Client ID for the message. Client IDs are used by the Remoting SDK for Session Management and to uniquely identify individual client on the server, for example by the Per-Client Class Factory or in your own custom code. Generally, you will not need to assign or read this value; the framework will automatically create a new unique client ID whenever a message object is instantiated on the client. However, you do have the option to read and write the ClientID property manually, for example to persist a specific client ID between shutdown and restart of your application.

property ClientID: TGuid read write

DefaultMessageIndex

The message index which will be used by default. It's used when the server sends events with a TROEventRepository.

property DefaultMessageIndex: integer read write

DefaultNamespaces    (declared in TROMessage)

property DefaultNamespaces: string read write

Envelopes    (declared in TROMessage)

Envelopes collection.

property Envelopes: TROMessageEnvelopeCollection read write

InterfaceName    (declared in TROMessage)

Holds the name of the interface (Service) that this message is calling.

property InterfaceName: string read write

MessageName    (declared in TROMessage)

The name of the method that this message is calling. This property is set by the Remoting SDK framework, and you will not usually change it manually. However, you might want to evaluate it for logging purposes or security checks, in the events of TROTransportChannel or Server.

property MessageName: string read write

ReferenceCounted  protected    (declared in TROMessage)

property ReferenceCounted: boolean read write

RODLReader    (declared in TROMessage)

property RODLReader: TROCustomRODLReader read write

Serializer    (declared in TROMessage)

Returns object that is used for serializing/deserializing any type of data

property Serializer: TROSerializer read write

SupportedMessages

Contains a list of supported messages.

property SupportedMessages: TROServerMultiMessageCollection read write

 

CheckForEnvelope    (declared in TROMessage)

Checks stream for envelope

class function CheckForEnvelope(aStream: TStream; var aEnvelopeName: string): boolean

Parameters:

  • aStream: stream
  • aEnvelopeName: envelope's name if found.

HasEnvelope    (declared in TROMessage)

class function HasEnvelope(const aData: array of Byte): Boolean

Parameters:

  • aData:

MessageMatchingTargetUri    (declared in TROMessage)

Creates a client message with type matching the provided target Uri. F.e. for provided uri supertcp://192.168.1.100:7020/bin this method will return an instance of the TROBinMessage class.

class function MessageMatchingTargetUri(const aUri: TROUri): TROMessage

Parameters:

  • aUri: Server Uri

MessageMatchingTargetUrl    (declared in TROMessage)

class function MessageMatchingTargetUrl(const aUrl: string): TROMessage

Parameters:

  • aUrl:

 

constructor Create  reintroduce overload virtual    (declared in TROMessage)

Creates a new instance.

constructor Create

constructor Create (TComponent)  overload override    (declared in TROMessage)

Creates a new instance.

constructor Create(aOwner: TComponent)

Parameters:

  • aOwner: Owner.

constructor CreateRefCountedClone  virtual    (declared in TROMessage)

constructor CreateRefCountedClone(iMessage: TROMessage)

Parameters:

  • iMessage:

ApplyAttributes2  protected virtual    (declared in TROMessage)

Sets SOAP attributes (SOAP message only)

procedure ApplyAttributes2

ApplyAttributes2_Transport  protected virtual    (declared in TROMessage)

Sets transport related attributes (SOAP message only)

procedure ApplyAttributes2_Transport(aTransport: IROTransport)

Parameters:


Assign  override

Copies the contents of another, similar object.

procedure Assign(iSource: TPersistent)

Parameters:

  • iSource: Instance whose properties will be copied

CheckProperties  override

Validates the message properties.

procedure CheckProperties

Clone  protected virtual    (declared in TROMessage)

Makes a shallow copy of this instance.

function Clone: IROMessage

CreateException  protected    (declared in TROMessage)

function CreateException(const aExceptionName: string; const aMessage: string): Exception

Parameters:

  • aExceptionName:
  • aMessage:

CreateSerializer  protected override

Creates the required serializer object.

function CreateSerializer: TROSerializer

DefaultMessage  protected

function DefaultMessage: IROMessage

EndWriteException  protected    (declared in TROMessage)

Performs finalization work after exception was written.

procedure EndWriteException(aStream: TStream)

Parameters:

  • aStream: stream

Envelopes_ProcessIncoming  protected    (declared in TROMessage)

Processes incoming envelopes.

procedure Envelopes_ProcessIncoming(aStream: TStream)

Parameters:

  • aStream: incoming stream

Envelopes_ProcessOutgoing  protected    (declared in TROMessage)

Processes outgoing envelopes.

procedure Envelopes_ProcessOutgoing(aStream: TStream)

Parameters:

  • aStream: outgoing stream

Finalize  protected override

Ensures that the message content is complete before sending it by performing all necessary final processing. This method is called after all parameters have been written to a message and before the message will be sent. It should perform all necessary wrap-up to ensure that a subsequent call to WriteToStream will produce a complete message.

procedure Finalize

FreeStream  protected override

Destroys stream

procedure FreeStream

GetModuleInfo  protected virtual    (declared in TROMessage)

Fills the aStream with RODL data and designates its format in aTransport and aFormat.

procedure GetModuleInfo(aStream: TStream; const aTransport: IROTransport; var aFormat: TDataFormat)

Parameters:

  • aStream:
  • aTransport:
  • aFormat:

GetRodlInfo (TStream, IROTransport, TDataFormat)  protected overload    (declared in TROMessage)

Fills the aStream with RODL data and designates its format in aTransport and aFormat.

procedure GetRodlInfo(aStream: TStream; const aTransport: IROTransport; var aFormat: TDataFormat)

Parameters:

  • aStream: Stream
  • aTransport: Transport channel
  • aFormat: Format

GetSerializer  protected override

function GetSerializer: TROSerializer

Initialize (IROTransport, string, string, string, TMessageType)  protected override

Initializes the message with the given parameters.

procedure Initialize(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string; aType: TMessageType)

Parameters:


Initialize (IROTransport, string, string, TMessageType)  protected override

Initializes the message with the given parameters.

procedure Initialize(const aTransport: IROTransport; const anInterfaceName: string; const aMessageName: string; aType: TMessageType)

Parameters:


InitializeEventMessage  protected    (declared in TROMessage)

Initializes an Event message with the given parameters.

procedure InitializeEventMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeExceptionMessage  protected virtual    (declared in TROMessage)

Initializes an Exception message with the given parameters.

procedure InitializeExceptionMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeRead  protected override

Performs additional initialization before reading.

procedure InitializeRead(const aTransport: IROTransport)

Parameters:


InitializeRequestMessage  protected    (declared in TROMessage)

Initializes a mtRequest message with the given parameters.

procedure InitializeRequestMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeResponseMessage  protected    (declared in TROMessage)

Initializes a mtResponse message with the given parameters.

procedure InitializeResponseMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitObject  protected override

Initializes message.

procedure InitObject

IsValidMessage  override

Validates content of message. Used for detection of message type (soap, bin, json, etc)

function IsValidMessage(aData: Pointer; aLength: Integer): boolean

Parameters:

  • aData: data for checking
  • aLength: lenght of data

ProcessException  protected    (declared in TROMessage)

procedure ProcessException

Read  protected override

The general method to read any data.

procedure Read(const aName: string; aTypeInfo: PTypeInfo; var Ptr: ; Attributes: TParamAttributes)

Parameters:

  • aName: Name of the object to read.
  • aTypeInfo: Runtime type information for the data to read.
  • Ptr: Output parameter, should point to the deserialized instance.
  • Attributes: Set of TParamAttribute

ReadArray  protected    (declared in TROMessage)

Reads an array value.

function ReadArray(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBinary  protected    (declared in TROMessage)

Reads a Binary value.

procedure ReadBinary(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDateTime  protected    (declared in TROMessage)

Reads a TDateTime value.

procedure ReadDateTime(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDecimal  protected    (declared in TROMessage)

Reads a Decimal value.

procedure ReadDecimal(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDouble  protected    (declared in TROMessage)

Reads a Double value.

procedure ReadDouble(const aName: string; aFloatType: TFloatType; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • aFloatType: Specifies the exact floating point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadEnumerated  protected    (declared in TROMessage)

Reads an enumerated value.

procedure ReadEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • anEnumTypeInfo: Runtime type information for the enuymerated type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadException  protected override

Reads the exception data from the incoming message and creates the exception object accordingly.

function ReadException: Exception

ReadFromStream (TStream)  protected override

Reads the contents of the message from the given stream.

procedure ReadFromStream(aStream: TStream)

Parameters:

  • aStream: stream

ReadFromStream (TStream, Boolean)  protected override

Reads the contents of the message from the given stream.

procedure ReadFromStream(aStream: TStream; var aFreeStream: Boolean)

Parameters:

  • aStream: stream
  • aFreeStream: free stream

ReadGuid  protected    (declared in TROMessage)

Reads a GUID value.

procedure ReadGuid(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt64  protected    (declared in TROMessage)

Reads a Int64 value.

procedure ReadInt64(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInteger  protected    (declared in TROMessage)

Reads a Integer value (32 bits or less).

procedure ReadInteger(const aName: string; anOrdType: TOrdType; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • anOrdType: Specifies the exact integer point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadLegacyString  protected    (declared in TROMessage)

Reads a legacy string (AnsiString or UTF8String) value.

procedure ReadLegacyString(const aName: string; var Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: integer; iMaxLength: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ExtraAttributes: specified what string should be read (AnsiString or UTF8String)
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • iMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadStruct  protected    (declared in TROMessage)

Reads a Struct value.

function ReadStruct(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadUnicodeString  protected    (declared in TROMessage)

Reads a UnicodeString value.

procedure ReadUnicodeString(const aName: string; var Ref: ; ArrayElementId: integer; iMaxLength: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • iMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadVariant  protected    (declared in TROMessage)

Reads a Variant value.

procedure ReadVariant(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadXml  protected    (declared in TROMessage)

Reads a XML value.

procedure ReadXml(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

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

SetAttributes  protected virtual    (declared in TROMessage)

Sets additional information.

procedure SetAttributes(aTransport: IROTransport; const aNames: array of string; const aValues: array of string)

Parameters:

  • aTransport: Transport channel
  • aNames:
  • aValues:

SetAutoGeneratedNamespaces  protected    (declared in TROMessage)

procedure SetAutoGeneratedNamespaces(aValue: string)

Parameters:

  • aValue:

SetDefaultNamespaces  protected    (declared in TROMessage)

procedure SetDefaultNamespaces(aValue: string)

Parameters:

  • aValue:

StoreAttributes2  protected    (declared in TROMessage)

stores SOAP attributes (SOAP message only)

procedure StoreAttributes2(const aNames: array of string; const aValues: array of string)

Parameters:

  • aNames:
  • aValues:

UnsetAttributes  protected virtual    (declared in TROMessage)

Clears additional information.

procedure UnsetAttributes(aTransport: IROTransport)

Parameters:

  • aTransport: Transport channel

UnsetAttributes2  protected virtual    (declared in TROMessage)

Clears additional information.

procedure UnsetAttributes2

UnsetAttributes2_Transport  protected virtual    (declared in TROMessage)

Clears additional information.

procedure UnsetAttributes2_Transport(aTransport: IROTransport)

Parameters:

  • aTransport: Transport channel

Write  protected override

Writes the value of the aName parameter from Ptr with the given aTypeInfo and ExtraAttributes to the message.

procedure Write(const aName: string; aTypeInfo: PTypeInfo; const Ptr: ; Attributes: TParamAttributes)

Parameters:

  • aName: Name of the object to write.
  • aTypeInfo: RTI
  • Ptr: Pointer to the source variable
  • Attributes: set of TParamAttribute

WriteArray  protected    (declared in TROMessage)

Writes an array value.

procedure WriteArray(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the object to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteBinary  protected    (declared in TROMessage)

Writes a Binary value.

procedure WriteBinary(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDateTime  protected    (declared in TROMessage)

Writes a TDateTime value.

procedure WriteDateTime(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDecimal  protected    (declared in TROMessage)

Writes a Decimal value.

procedure WriteDecimal(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDouble  protected    (declared in TROMessage)

Writes a Double value.

procedure WriteDouble(const aName: string; aFloatType: TFloatType; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • aFloatType: Specifies the exact floating point data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteEnumerated  protected    (declared in TROMessage)

Writes an enumerated value.

procedure WriteEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • anEnumTypeInfo: Runtime type information of the enumerated type.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteEnvelopeHeader  protected    (declared in TROMessage)

Writes envelope header to outgoing stream.

procedure WriteEnvelopeHeader(aEnvelope: TROMessageEnvelope; AStream: TStream)

Parameters:

  • aEnvelope: envelope
  • AStream: outgoing stream

WriteException  protected override

Writes an Exception value.

procedure WriteException(aStream: TStream; anException: Exception)

Parameters:

  • aStream: Target stream
  • anException: Exception object to write

WriteGuid  protected    (declared in TROMessage)

Writes a GUID value.

procedure WriteGuid(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInt64  protected    (declared in TROMessage)

Writes a Int64 value.

procedure WriteInt64(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInteger  protected    (declared in TROMessage)

Writes a Integer value (32 bits or less).

procedure WriteInteger(const aName: string; anOrdType: TOrdType; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • anOrdType: Specifies the exact integer data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteLegacyString  protected    (declared in TROMessage)

Writes a legacy string (AnsiString or UTF8String) value.

procedure WriteLegacyString(const aName: string; const Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ExtraAttributes: specified what string should be written (AnsiString or UTF8String)
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteStruct  protected    (declared in TROMessage)

Writes a Struct value.

procedure WriteStruct(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteToStream  protected override

Writes the content of the message to aStream.

procedure WriteToStream(aStream: TStream)

Parameters:

  • aStream: stream

WriteUnicodeString  protected    (declared in TROMessage)

Writes a WideString value.

procedure WriteUnicodeString(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteVariant  protected    (declared in TROMessage)

Writes a Variant value to the message.

procedure WriteVariant(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteXml  protected    (declared in TROMessage)

Writes a XML value.

procedure WriteXml(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

 

OnAfterProcessIncomingEnvelopes    (declared in TROMessage)

Fires after incoming envelopes were processed

property OnAfterProcessIncomingEnvelopes: TStreamOperation read write
delegate: procedure OnAfterProcessIncomingEnvelopes(aStream: TStream)

OnAfterProcessOutgoingEnvelopes    (declared in TROMessage)

Fires after outgoing envelopes were processed

property OnAfterProcessOutgoingEnvelopes: TStreamOperation read write
delegate: procedure OnAfterProcessOutgoingEnvelopes(aStream: TStream)

OnBeforeProcessIncomingEnvelopes    (declared in TROMessage)

Fires before incoming envelopes were processed

property OnBeforeProcessIncomingEnvelopes: TStreamOperation read write
delegate: procedure OnBeforeProcessIncomingEnvelopes(aStream: TStream)

OnBeforeProcessOutgoingEnvelopes    (declared in TROMessage)

Fires before outgoing evvelopes were processed

property OnBeforeProcessOutgoingEnvelopes: TStreamOperation read write
delegate: procedure OnBeforeProcessOutgoingEnvelopes(aStream: TStream)

OnFinalizeMessage    (declared in TROMessage)

Fires as a message object is getting finalized, to send a new request or response. This happens after the entire message has been generated, all parameters have been added, and the message is ready to be sent off over the network.

property OnFinalizeMessage: TROFinalizeMessageEvent read write
delegate: procedure OnFinalizeMessage(Sender: TROMessage)

OnInitializeMessage    (declared in TROMessage)

Fires as a message object is getting initialized, to send a new request or response. This happens after the basic message options are set, but before any parameters or data have been stored in the message.

property OnInitializeMessage: TROInitializeMessageEvent read write
delegate: procedure OnInitializeMessage(Sender: TROMessage; const aTransport: IROTransport; const anInterfaceName: string; const aMessageName: string)

OnReadFromStream    (declared in TROMessage)

Fires before the message is read from the stream that was received over the network. You can use this event to inspect the received stream, or to make manual modifications to it, for example to apply any custom decryption to the message stream before it is processed.

property OnReadFromStream: TStreamOperation read write
delegate: procedure OnReadFromStream(aStream: TStream)

OnReadMessageParameter    (declared in TROMessage)

Fires after an individual message parameter has been read from the received message. The event call will include information about the name and type of the parameter, as well as an untyped pointer to the data. Use this event handler to inspect or log the parameters that are received. In theory, it is also possible to modify the value parameter using the DataRef pointer, but this should be done with extreme caution.

property OnReadMessageParameter: TROReadMessageParameterEvent read write
delegate: procedure OnReadMessageParameter(Sender: TROMessage; const aName: string; aTypeInfo: PTypeInfo; const DataRef: pointer; Attributes: TParamAttributes)

OnServerException    (declared in TROMessage)

Fires if an exception message is received from the server. Use this event handler to provide a single point of interception to be notified of all exceptions raised on the server. In contrast to the TROTransportChannel's OnException event, this event will not fire for communication errors or local exceptions during the processing of a request, but only for exceptions that truly originated on the server.

property OnServerException: TROServerExceptionEvent read write
delegate: procedure OnServerException(anException: Exception; var RaiseException: boolean)

OnWriteException    (declared in TROMessage)

Fires after an exception message was written to the stream that will be sent over the network. This event will fire in addition to (and before) the OnWriteToStream event. You can use this event to inspect the exception message or the outgoing stream.

property OnWriteException: TROWriteExceptionEvent read write
delegate: procedure OnWriteException(Sender: TROMessage; aStream: TStream; E: Exception)

OnWriteMessageParameter    (declared in TROMessage)

Fires before an individual message parameter will be written to the outgoing message. The event call will include information about the name and type of the parameter, as well as an untyped pointer to the data.

property OnWriteMessageParameter: TROWriteMessageParameterEvent read write
delegate: procedure OnWriteMessageParameter(Sender: TROMessage; const aName: string; aTypeInfo: PTypeInfo; const DataRef: pointer; Attributes: TParamAttributes)

OnWriteToStream    (declared in TROMessage)

Fires after the message was written to the stream that will be sent over the network. You can use this event to inspect the outgoing stream, or to make manual modifications to it, e.g. to apply any custom encryption to the message stream before it is sent off.

property OnWriteToStream: TStreamOperation read write
delegate: procedure OnWriteToStream(aStream: TStream)

See Also