public static class SimpleEventScheduler.Builder extends Object
SimpleEventScheduler
.
The TransactionManager
is defaulted to a NoTransactionManager
. The
ScheduledExecutorService
and EventBus
are a hard requirements and as such should be
provided.
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SimpleEventScheduler |
build()
Initializes a
SimpleEventScheduler as specified through this Builder. |
SimpleEventScheduler.Builder |
eventBus(EventBus eventBus)
Sets the
EventBus used to publish events on to, once the schedule has been met. |
SimpleEventScheduler.Builder |
scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
Sets the
ScheduledExecutorService used for scheduling and triggering events. |
SimpleEventScheduler.Builder |
transactionManager(TransactionManager transactionManager)
Sets the
TransactionManager used to build transactions and ties them on event publication. |
protected void |
validate()
Validates whether the fields contained in this Builder are set accordingly.
|
public SimpleEventScheduler.Builder eventBus(EventBus eventBus)
EventBus
used to publish events on to, once the schedule has been met.eventBus
- a EventBus
used to publish events on to, once the schedule has been metpublic SimpleEventScheduler.Builder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
ScheduledExecutorService
used for scheduling and triggering events.scheduledExecutorService
- a ScheduledExecutorService
used for scheduling and triggering
eventspublic SimpleEventScheduler.Builder transactionManager(TransactionManager transactionManager)
TransactionManager
used to build transactions and ties them on event publication. Defaults
to a NoTransactionManager
.transactionManager
- a TransactionManager
used to build transactions and ties them on event
publicationpublic SimpleEventScheduler build()
SimpleEventScheduler
as specified through this Builder.SimpleEventScheduler
as specified through this Builderprotected void validate() throws AxonConfigurationException
AxonConfigurationException
- if one field is asserted to be incorrect according to the Builder's
specificationsCopyright © 2010–2023. All rights reserved.