The TROEventReceiver visual component is used on the client side to poll or actively receive callback event messages from a server and initiate the execution of the events (more information about TROEventReceiver see Event Sinks and Server Callbacks).
For example, consider the procedures RegisterEventReceiver and CallbackEvents in the TROBaseActiveEventChannel class.
procedure TROBaseActiveEventChannel.RegisterEventReceiver(aReceiver: IROEventReceiver); begin if (aReceiver <> nil) and (fEventReceiverList.IndexOf(aReceiver) = -1) then begin fEventReceiverList.Add(aReceiver); ... end; procedure TROBaseActiveEventChannel.CallbackEvents(aData: TStream; aThread: TThread); var i: integer; begin ... for I := 0 to fEventReceiverList.Count - 1 do (fEventReceiverList[i] as IROEventReceiver).Dispatch(aData, aThread); ... end;
- Unit: uROClientIntf.pas
- Ancestry: IROActiveEventChannel
Registers a new event receiver object aReceiver in the specified channel. This procedure is needed to further use the aReceiver as receiver for callback events.
procedure RegisterEventReceiver(aReceiver: IROEventReceiver)
- aReceiver: the event receiver that should be registered.
procedure UnregisterEventReceiver(aReceiver: IROEventReceiver)
- aReceiver: The event receiver that should be unregistered.