public static class JobRunrEventScheduler.Builder extends Object
JobRunrEventScheduler.
The TransactionManager is defaulted to a NoTransactionManager.
The JobScheduler, Serializer and EventBus are hard requirements and as such should
be provided.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
JobRunrEventScheduler |
build()
Initializes a
JobRunrEventScheduler as specified through this Builder. |
JobRunrEventScheduler.Builder |
eventBus(EventBus eventBus)
Sets the
EventBus used to publish events on once the schedule has been met. |
JobRunrEventScheduler.Builder |
jobScheduler(org.jobrunr.scheduling.JobScheduler jobScheduler)
Sets the
JobScheduler used for scheduling and triggering purposes of the events. |
JobRunrEventScheduler.Builder |
serializer(Serializer serializer)
|
JobRunrEventScheduler.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 JobRunrEventScheduler.Builder jobScheduler(org.jobrunr.scheduling.JobScheduler jobScheduler)
JobScheduler used for scheduling and triggering purposes of the events.jobScheduler - a JobScheduler used for scheduling and triggering purposes of the eventspublic JobRunrEventScheduler.Builder serializer(Serializer serializer)
serializer - a Serializer used to de-/serialize the payload, and
MetaData.public JobRunrEventScheduler.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 JobRunrEventScheduler.Builder eventBus(EventBus eventBus)
EventBus used to publish events on once the schedule has been met.eventBus - a EventBus used to publish events on once the schedule has been metpublic JobRunrEventScheduler build()
JobRunrEventScheduler as specified through this Builder.JobRunrEventScheduler 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.