Events

The HACL provides the capability of asynchronous notification of certain events. An application can choose to be notified when specific events occur. For example, the application can be notified when a new Z and I Emulator for Windows connection starts. Currently the HACL supports notification for the following events:
  • Connection start/stop
  • Communications connect/disconnect
  • Operator keystrokes
  • Presentation space or OIA updates
Notification of events is implemented by the ECLNotify abstract base classes. A separate class exists for each event type. To be notified of an event, the application must define and create an object derived from one of the ECLNotify abstract base classes. That object must then be registered by calling the appropriate HACL registration function. Once an application object is registered, its NotifyEvent method is called whenever the event of interest occurs.
Note:
  1. The application’s NotifyEvent method is called asynchronously on a separate thread of execution. Therefore, the NotifyEvent method should be reentrant, and if it accesses application resources, appropriate locking or synchronization should be used.
  2. Some HACL layers (such as the Automation Objects) may not fully support or implement HACL events.