EventManager (open)
Eventmanager object. Used to receive events and broadcast them.
Syntax
LOADLIB "wh::ipc.whlib";
OBJECTTYPE EventManager
Constructor
- MACRO NEW()
Construct a new event manager, don't forget to call @a Close when not needed anymore
Properties
- PROPERTY handle
Handle to wait on, becomes signalled when a message might be available
Functions
- ASYNC FUNCTION AsyncReceiveEvent(DATETIME wait_until)
Asynchronously receives an event
- MACRO BroadcastEvent(STRING event, RECORD msg)
Broadcasts an event to all listeners that have registered an interest in events of that name
- MACRO ClearInterests()
Clears all registered interests
- MACRO Close()
Closes this event manager, releases all resources
- RECORD FUNCTION ReceiveEvent(DATETIME wait_until)
Tries to receive incoming events
- INTEGER FUNCTION RegisterInterest(STRING mask)
Registers an interest. Registrations are counted, so every registration must be matched by an unregistration
- MACRO UnregisterInterest(INTEGER id)
Unregisters an interest
- MACRO UnregisterInterestByName(STRING mask)
Unregisters an interest
- BOOLEAN FUNCTION Wait(DATETIME until)
Wait until a message might be available