|DotNet Class HL7Connect.Kernel.EventHandler|
Interface to handle any of the events that occur in HL7Connect. The different events may be differentiated either by their class or by their EventName property
Once loaded, the event handler will be kept loaded until all the contexts in which it is used are closed. (i.e. interfaces stopped, and/or kernel shut down).
Event handlers generally need to be thread safe - see discussion on the Start method
|void Start(TEventHandlerThreadMode threadMode, HL7Connect.Services.Access services);|
|Initialises the interface that will be handling events. Usually
called when the kernel starts or when an interface starts.
Start will only be called once for each instance - there will be a
separate instance of the COM Interface for each event/Interface
combination on HL7Connect.
The threadmode defines how the interface will be used in regard to threads. There is three possibilities:
The rest of the server interfaces (IHL7ConnectServerMessageReceiverPlugin, etc) are effectively limited multithread.
Note that all of the interfaces are defined as fully multi-threaded to COM. Note also that when run test cases are run, threadmode is always single threaded.
|void Execute(HL7Connect.Events.Base event_);|
|Called when the event occurs, as configured in HL7Connect.|
|Called when the interface or kernel is stopping as appropriate for the event type.|