The TROEventInvoker class is used to invoke events that came from the client to the server. This is the base class for custom EventInvoker classes created in the _Intf source files auto-generated from your RODL Library.
You will not usually deal with this class (or its descendants) directly, but the Remoting SDK invocation framework will use them to execute procedures that are related with the server events.
For example, if you want to see the TROEventInvoker work, you can add a new event sink in the |service builder and then rebuild the project group. In the Intf file you will see the Invoke
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 write
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
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; CloneMessage: boolean)
- aMessage: Specified message
- CloneMessage: When true, a copy of the aMessage will be saved, otherwise a reference to the aMessage will be saved.
Creates a new instance.
constructor Create(anEventReceiver: TROEventReceiver; const aMessage: IROMessage; CloneMessage: boolean)
Calls the method of the aTarget object that processes the current event. The aTarget always contains the event method. The EventData defines the current event data. The Execute procedure defines the method with the name "
Invoke_+__Message.MessageName" and then calls this method via the aTarget object.
procedure Execute(const aTarget: TObject; EventData: TStream)
- aTarget: Object that processes the current event
- EventData: The data that is associated with the current event