org.electrocodeogram.cpc.core.api.provider.notification
Interface INotificationDelayProvider

All Superinterfaces:
IProvider

public interface INotificationDelayProvider
extends IProvider

A notification delay provider takes CloneNotificationEvents and queues them according to some internal criteria. These CloneNotificationEvents are then reexamined if certain conditions are met and are either retransmitted as new CloneNotificationEvents or discarded.
The INotificationDelayProvider interface is implemented by all notification delay providers.

A typical implementation approach would be to queue CloneNotificationEvents and to reexamine each modified clone once:


This provider type typically creates an internal background thread.

Usage Example:
Providers of this type are needed to support delayed notification of the user about some potential update anomaly. I.e. the user might still continue to modify code and might also modify the other group members of the modified clone. Displaying a warning right away might lead to superfluous warnings if the programmer is already well aware about the other clone instances.

Author:
vw
See Also:
INotificationEvaluationProvider, IEvaluationResult, CloneNotificationEvent

Method Summary
 void enqueueNotification(CloneNotificationEvent cloneNotificationEvent)
          Takes an IEvaluationResult as CloneNotificationEvent and internally queues it for a specific time or until a specific condition arises.
 
Methods inherited from interface org.electrocodeogram.cpc.core.api.provider.IProvider
getProviderName, toString
 

Method Detail

enqueueNotification

void enqueueNotification(CloneNotificationEvent cloneNotificationEvent)
Takes an IEvaluationResult as CloneNotificationEvent and internally queues it for a specific time or until a specific condition arises. The corresponding CloneNotificationEvent is then reexamined and either dispatched as new event or discarded.

Only one CloneNotificationEvent per IClone is queued. A new CloneNotificationEvent will replace any existing CloneNotificationEvents for the same IClone.

This method returns right away. The checking, re-examination and potential re-dispatching of the event is done in a background thread or job.

The remaining aspects, especially the criteria used for delaying and re-dispatching, are unspecified and are likely to vary from implementation to implementation.

Parameters:
cloneNotificationEvent - the CloneNotificationEvent to queue, never null. The event has to be of type CloneNotificationEvent.Type#DELAY_NOTIFY or CloneNotificationEvent.Type#DELAY_WARN. All other types are not permitted.