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 the status of a connection to a host changes. Currently the HACL supports notification for the following events:

Table 1. Events for HACL
Events Interface Used to Capture Events
Communications connect and disconnect ECLLCommNotify
Presentation space updates ECLPSNotify
Operator Information Area (OIA) updates ECLOIANotify

Event notification is defined by the respective HACL Notify interfaces. A separate interface exists for each event type. To be notified of an event, the application must define and create an object which implements the interface for the event type requiring notification. 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 an event occurs.

Note: The application's NotifyEvent method is called asynchronously on a separate thread of execution. Therefore, the NotifyEvent method should be entered again. Appropriate locking or synchronization should be used if application resources are accessed.