archiveEvent()

Archives the specified event in the application's archive store with appropriate status.

Syntax

public int archiveEvent(String eventID);
 

Parameters

eventID
Specifies the event ID of the event to archive.

Return values

An integer that indicates the outcome status of the archive operation. Compare this integer value with the following outcome-status constants to determine the status:

CWConnectorConstant.SUCCEED
The archiving of the event succeeded.
CWConnectorConstant.FAIL
The archiving of the event failed.

Exceptions

ArchiveFailedException
Thrown when the underlying application is unable to archive the event.
InvalidStatusChangeException
Thrown if the connector tries to update the event status with one that is invalid for the application.

Notes

The arhiveEvent() method is usually called from the poll method, pollForEvents() to archive processed or unsuccessful events to the event archive store.

Important:
The archiveEvent() method is not an abstract method because it is a synchronized method. However, the event-store class must implement this method to provide the ability to archive an event to the archive store.

See also

deleteEvent(),, pollForEvents()

Copyright IBM Corp. 1997, 2004