com.ibm.eNetwork.ECL.event
Interface ECLPSListener


public interface ECLPSListener

The ECLPSListener interface can be used to implement an object which will receive ECLPSEvents. Events are generated whenever the presentation space is updated. The presentation space can be updated by the host (when a new screen is sent) or through keyboard input. Special events are generated when event generation stops and when errors occur during event generation.

ECLPSListeners can be registered for either host, user, or all event types. Host events are generated as a result of host driven presentation space changes. User events are generated as a result of user input via ECLPS methods, like SendKeys().

To be notified of PS events, the application must:

  1. Define a class which implements the ECLPSListener interface.
  2. Implement the PSNotifyEvent(), PSNotifyStop(), and PSNotifyError() methods.
  3. Create an instance of the new class.
  4. Register the instance with the ECLPS.RegisterPSEvent() method.

See Also:
ECLPS.RegisterPSEvent(com.ibm.eNetwork.ECL.event.ECLPSListener), ECLPSEvent

Method Summary
 void PSNotifyError(ECLPS ps, ECLErr err)
          The PSNotifyError() method is called whenever the ECLPS object detects an error during event generation.
 void PSNotifyEvent(ECLPSEvent evt)
          The PSNotifyEvent() method is called whenever the presentation space is updated.
 void PSNotifyStop(ECLPS ps, int reason)
          The PSNotifyStop() method is called when event generation is stopped for any reason.
 

Method Detail

PSNotifyEvent

public void PSNotifyEvent(ECLPSEvent evt)
The PSNotifyEvent() method is called whenever the presentation space is updated. The presentation space can be updated by the host (when a new screen is sent) or through user input via ECLPS methods.

An application should not assume it will receive a distinct event for every update. An update event is defined as one or more changes in the PS since the last time an event was generated (or since registration, if there was no prior update event).

Parameters:
evt - The ECLPSEvent object.

PSNotifyStop

public void PSNotifyStop(ECLPS ps,
                         int reason)
The PSNotifyStop() method is called when event generation is stopped for any reason. Event generation might stop because of an error condition or because the ECLPS.UnregisterPSEvent() method was called.
Parameters:
ps - The object which generated the event.
reason - This parameter is not currently used.

PSNotifyError

public void PSNotifyError(ECLPS ps,
                          ECLErr err)
The PSNotifyError() method is called whenever the ECLPS object detects an error during event generation. An ECLErr object containing information about the error is passed to this method. If event generation stops due to an error, the PSNotifyStop() method is also called.
Parameters:
ps - The object which generated the event.
err - The ECLErr object containing error data.
See Also:
ECLErr, PSNotifyStop(com.ibm.eNetwork.ECL.ECLPS, int)