When the service is called to sync, it must generate and send events to enable the scheduler and UI to work properly. Events are created using the SyncEventFactory. Event types are defined via the EventType class.
The following example shows the creation and sending of an event, using the SyncEventSource to assist.
SyncEventSource eventSource = new SyncEventSource();
public void sync( SyncUnit syncUnit )
SyncEvent event = SyncEventFactory.createSyncEvent(
eventSource.notify( event );
This example assumes that the listeners added to the SyncService are attached to the SyncEventSource.
SyncService eventsParent topic: Implementing SyncService
The following events are the only ones that a SyncService implementation needs to send.
When creating an Event, the SyncEventFactory requires an event context. Where does the event context come from and how do I set it?