public interface EventManager
Event manager that is entry point for handling events generated during
execution.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPublisher(EventPublisher publisher) Adds given publisher to the event manager's list of publishers.newBatch()Returns new batch instance, that should be used just by one processing threadvoidpublish(EventBatch batch) Publishes events of the batch with main restriction that the batch is processed only when there are any publishers available.voidOptionally adds available addons in the running servicevoidsetService(String service) Sets the service information that will be attached to events as source.
-
Method Details
-
newBatch
EventBatch newBatch()Returns new batch instance, that should be used just by one processing thread- Returns:
- new batch instance
-
publish
Publishes events of the batch with main restriction that the batch is processed only when there are any publishers available.- Parameters:
batch- batch to be published
-
addPublisher
Adds given publisher to the event manager's list of publishers. Multiple publishers can be added and each will be invoked with exact same events.- Parameters:
publisher- publisher to be added
-
setService
Sets the service information that will be attached to events as source. This is expected to be URL like structure that will allow consumer of the events to navigate back.- Parameters:
service- endpoint of the service
-
setAddons
Optionally adds available addons in the running service- Parameters:
addons- addons available in the service
-