fetchEvents()

Retrieves a specified number of Ready-for-Poll events from the application's event store.

Syntax

public abstract Vector fetchEvents(int pollQuantity

Parameters

pollQuantity
The number of events to fetch from the application store.

Return values

None.

Exceptions

ConnectionFailureException
Thrown when connection could not be established.

EventProcessingException
Thrown when an error occurs fetching events after the connection is established.

Notes

The fetchEvents() method searches the event store for event records with the READY_FOR_POLL status and puts them in the event. The number of events that fetchEvents() retrieves is specified by pollQuantity, which correlates with the PollQuantity connector configuration property. For each retrieved event, the method must create a CWConnectorEvent event object, put this event object into a Java Vector, and return the Vector. The fetchEvents() method determines the order in which event objects are stored in the eventsToProcess vector.

Important:
The fetchEvents() method is an abstract method. Therefore, the event-store class must implement this method to provide the ability to fetch READY_FOR_POLL events from the event store.
Note:
The fetchEvents() method is usually called from the poll method, pollForEvents().
Note:
A previous signature of fetchEvents() with no input parameter and no return value has been deprecated. This version replaces it.

See also

getNextEvent(),, pollForEvents()

Copyright IBM Corp. 1997, 2004