All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.ibm.eNetwork.ECL.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 Index

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

Methods

 o NotifyEvent
 public abstract 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.
 o NotifyStop
 public abstract 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.
 o NotifyError
 public abstract 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

All Packages  Class Hierarchy  This Package  Previous  Next  Index