280 WebSphere Business Integration Adapters
All Java connectors must extend this class to access the event store. To access
the application’s event store through the Java CWConnectorEventStore class,
implement the following abstract methods in their derived event-store class:
deleteEvent()
fetchEvents()
setEventStoreStatus()
To access an archive store, implement the archiveEvent() method.
To provide the ability to recover in-progress events, implement the
recoverInProgressEvents() method.
To provide the ability to resubmit archived events for subsequent polls of the
event store, implement the resubmitArchivedEvents() method.
Example 17-1 shows the skeleton for the RMEventStore class of our custom
adapter. See Figure 17-1 on page 278 for the class diagram.
Example 17-1 The extended RMEventStore class
public class RMEventStore extends CWConnectorEventStore {
public void fetchEvents() throws StatusChangeFailedException {
}
public void recoverInProgressEvents() throws StatusChangeFailedException {
}
public void deleteEvent(String eventID) throws DeleteFailedException {
}
public void setEventStatus(String eventID, int status)
throws InvalidStatusChangeException {
}
public void archiveEvents() throws StatusChangeFailedException {
}
}
setEventStatus() Sets the status of an event in the event store.
setEventsToProcess() Sets the eventsToProcess vector with
specified events.
setTerminate() Sets the internal terminate-connector flag to
true.
updateEventStatus() Updates the event status both in the event
store and in the event.
Note: In the RMAdapter, we do not provide the ability to resubmit archived
events. As a result, we do not implement the resubmitArchiveEvents()
method.
Member method Description