|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The EventStore interface is used to provide a common method for the Event Manager class to interact with an Event Store. The Event Store must be implemented by the Resource Adapter and passed to the EventManager constructor. Any implementation of eventStore must provide these services. 1) Uniqueness of event IDs. We must be able to track the progress of the event as it goes through the system, and be able to recover an individual event. 2) Ordering of events: The adapter developer is responsible for putting the events in the correct order in the getEvents() call. If the delivery type is "ORDERED" we will honor that order if the delivery type is "UNORDERED", we will not honor it. 3) The ability to mark events as "IN_PROGRESS", and eventually delete them. 4) The ability to retrieve the complete object from the EIS. Usually event objects are a subset of the complete object for publication.
Method Summary | |
---|---|
void |
commitWork()
Commits the pending transaction |
void |
deleteEvent(Event event)
This method deletes the specified event from the event store. |
java.util.ArrayList |
getEvents(int quantity,
int eventStatus,
java.lang.String[] typeFilter)
This method queries the Event Store and retrieves up to quantity events of the specified type and returns the events in an ArrayList. |
java.lang.Object |
getObjectForEvent(Event event)
This method returns a DataObject that contains all the business data we intend to publish. |
Event |
getSpecificEvent(java.lang.String eventId)
Returns an event given a specific event ID. |
boolean |
implementsFiltering()
If the eventStore can filter events by type in the getEvents call, this should return "true". |
boolean |
isTransactional()
Is the EventStore transactional? If so, this method should return "true". |
void |
rollbackWork()
rolls back any uncommited work. |
void |
updateEventStatus(Event event,
int newstatus)
This method updates the status of the specified event. |
Method Detail |
public boolean implementsFiltering()
public java.util.ArrayList getEvents(int quantity, int eventStatus, java.lang.String[] typeFilter) throws javax.resource.ResourceException, javax.resource.spi.CommException
quantity
- indicates the maximum number of events to retreive.typeFilter
- an array of types that we're interested in. If this is null,
return all events.
javax.resource.ResourceException
javax.resource.spi.CommException
public void deleteEvent(Event event) throws javax.resource.ResourceException, javax.resource.spi.CommException
javax.resource.ResourceException
javax.resource.spi.CommException
public void updateEventStatus(Event event, int newstatus) throws javax.resource.ResourceException, javax.resource.spi.CommException
newstatus
- The new status value
javax.resource.ResourceException
javax.resource.spi.CommException
public Event getSpecificEvent(java.lang.String eventId) throws javax.resource.ResourceException, javax.resource.spi.CommException
eventId
- the eventID that specifies the desired event
javax.resource.ResourceException
javax.resource.spi.CommException
public java.lang.Object getObjectForEvent(Event event) throws javax.resource.ResourceException, javax.resource.spi.CommException
event
- the event that we wish to get the full object for
javax.resource.ResourceException
javax.resource.spi.CommException
public boolean isTransactional()
public void rollbackWork() throws javax.resource.ResourceException, javax.resource.spi.CommException
javax.resource.ResourceException
javax.resource.spi.CommException
public void commitWork() throws javax.resource.ResourceException, javax.resource.spi.CommException
javax.resource.ResourceException
javax.resource.spi.CommException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |