Event Section
You define event sources and event dispatchers in the Event section. The technical name of event sources and event dispatchers is EventSource and EventDispatcher, respectively.
Event Source
Event sources are used to generate event messages. These messages trigger the export of a module through an event dispatcher. EventSources and EventDispatchers are DataObjects. As such they have a name and are stored in the instance repository under the name inst.objectName
given the event source was named objectName
. The instances are created when the nevisDataPorter daemon is started. They are not available in the instance repositories of the DataPorter instances in the worker pool and therefore must not be referenced by them. Every event source can be used by multiple event dispatchers.
Event Dispatcher
An event dispatcher links an event source with a single export module. The following example creates a single TimeEventSource, which signals an event daily at midnight and links it to the module named default
.
<event>
<eventSource name="srcDaily" type="TimeEventSource">
<dp:paraVal name="cronString" value="0 0 * * * ?"/>
</eventSource>
<eventDispatcher name="dispatcher_demo_ad" type="EventDispatcher">
<dp:paraVal name="module" value="default"/>
<dp:paraList name="source">
<value>${inst.srcDaily}</value>
</dp:paraList>
</eventDispatcher>
</event>