pollForEvents()

Polls an application's event store for events that cause changes to business objects.

Syntax

public int pollForEvents();

Parameters

None.

Return values

An integer that indicates the outcome status of the polling operation.The pollForEvents() method typically uses the following return codes:

CWConnectorConstant.SUCCEED
The polling action succeeded regardless of whether an event is retrieved.

CWConnectorConstant.FAIL
The polling operation failed.

CWConnectorConstant.APPRESPONSETIMEOUT
The application is not responding.

Exceptions

None.

Notes

The connector framework calls the pollForEvents() method, at a time interval that you can configure, so that the connector can detect any event in the application that is interesting to a subscriber. The frequency at which the class library calls this method depends on the poll frequency value that is configured by the PollFrequency connector configuration property.

Note:
The CWConnectorAgent class provides a default implementation for the pollForEvents() method. Therefore, you can either use this default implementation or override the method to implement your own polling mechanism. To provide a different polling behavior, you can implement your own version of pollForEvents().

The CWConnectorAgent class provides a default implementation for the pollForEvents() method, which is based on the CWConnectorEvent event objects as a standard interface for event management. For information on the behavior of this default implementation, see "Implementing the pollForEvents() method".. This default implementation provides the basic steps for polling an event store. If you override the default pollForEvents(), your implementation must perform similar steps.

Note:
If your connector executes in a parallel-process mode, it uses a separate polling slave process to handle polling.

See also

gotApplEvent(),, isSubscribed()

Copyright IBM Corp. 1997, 2004