For most connectors, the application-specific component of the connector implements the event retrieval mechanism. The connector developer does this as part of the connector design and implementation. This mechanism works in conjunction with the event detection mechanism, which detects entity changes and writes event records to the event store. Event retrieval transfers information about application events from the event store to the connector's application-specific component.
This section provides the following information about event retrieval:
Two common mechanisms use to retrieve event records from an event store are:
In a polling mechanism, the application provides a persistent event store, such as an database table or inbox, where it writes event records when changes to application entities occur. The connector periodically checks, or polls, the event store for changes to entities that correspond to business object definitions that the connector supports. In general, the only information about the business object that is kept in the event store is the type of operation and the key values of the application entity. As the connector processes the event, it retrieves the remainder of the application entity data. After the connector has processed the event, it removes the event record from the event store and places it in an archive store.
To implement a polling mechanism to perform event retrieval, the connector's application-specific component uses a poll method, called the pollForEvents() method. The poll method checks the event store, retrieves new events, and processes each event before returning.
This section provides the following information about the poll method:
The connector framework calls the poll method at a specified polling interval as defined by the PollFrequency connector configuration property. This property is initialized at connector installation time with Connector Configurator. Typically, the polling interval is about 10 seconds.
Therefore, the connector framework calls the pollForEvents() method in either of the following conditions:
Figure 54 illustrates the basic behavior of a poll method:
Each time the poll method is called, it checks for and retrieves new events, determines whether the event has subscribers, retrieves application data for events with subscribers, and sends business objects to InterChange Server.
Figure 54. Basic behavior of pollForEvents() method
For information on how to implement the pollForEvents() method, see "Implementing the poll method".