com.ibm.eNetwork.ECL
Interface ECLCommNotify


public interface ECLCommNotify

ECLCommNotify can be used to implement an object which will receive and handle ECLConnection events. Events are generated whenever the connection status of a session changes. The connection status is either true (connected) or false (not connected). Special events are generated when event generation stops and when errors occur during event generation.

To be notified of communication events, the application must perform the following steps:

  1. Define a class which implements the ECLCommNotify interface.
  2. Implement the NotifyEvent(), NotifyStop(), and NotifyError() methods.
  3. Create an instance of the new class.
  4. Register the instance with the ECLConnection.RegisterCommEvent() method.

See Also:
ECLConnection

Method Summary
 void NotifyError(ECLConnection connection, ECLErr e)
          The NotifyError() method is called whenever the ECLConnection object detects an error during event generation.
 void NotifyEvent(ECLConnection connection, boolean connected)
          The NotifyEvent() method is called whenever the connection status changes.
 void NotifyStop(ECLConnection connection, int reason)
          The NotifyStop() method is called when event generation is stopped for any reason.
 

Method Detail

NotifyEvent

public void NotifyEvent(ECLConnection connection,
                        boolean connected)
The NotifyEvent() method is called whenever the connection status changes. The connection status is either true (connected) or false (not connected).
Parameters:
connection - The object which generated the event.
connected - Boolean value which is true if there is a connection, otherwise it is false.

NotifyStop

public void NotifyStop(ECLConnection connection,
                       int reason)
The NotifyStop() method is called when event generation is stopped for any reason. Event generation can be stopped because of an error condition or because the ECLConnection.UnregisterCommEvent() method was called.
Parameters:
connection - The object which generated the event.
reason - This parameter is not currently used.

NotifyError

public void NotifyError(ECLConnection connection,
                        ECLErr e)
The NotifyError() method is called whenever the ECLConnection 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 NotifyStop() method is also called.
Parameters:
connection - The object which generated the event.
e - The ECLErr object containing error data.
See Also:
ECLErr, NotifyStop(com.ibm.eNetwork.ECL.ECLConnection, int)