A Gateway event provider must have a Java class that implements the EventProvider interface. Several interfaces and classes are related to an event provider. These include:
- EventProvider: The event provider interface that must be implemented by a Gateway event provider
- EventContext: This can be used to retrieve useful information about the event listener instance and the event provider instance, including values of configuration parameters at both the provider instance level and the listener instance level.
- EventBroker: The reference to the singleton event broker instance. This can be retrieved from the EventContext. It schedules the synchronization to run in the future according to EventTrigger passed in from the event provider, and handles the merging of the EventTrigger when necessary.
- EventTrigger - This contains information to identify a Gateway synchronization and the parameter values to overwrite. The event provider needs to translate an event to an EventTrigger, and pass to EventBroker to trigger synchronization to run.
- Event - This contains information about an event
If the event provider is a polling type, it should have real implementation for the "poll" method. If the event provider is a receiving type, it should implement the "receive" method instead.The sample event provider implements both poll and receive methods.