Class AxonServerEventScheduler.Builder
java.lang.Object
org.axonframework.axonserver.connector.event.axon.AxonServerEventScheduler.Builder
- Enclosing class:
- AxonServerEventScheduler
Builder class to instantiate an
AxonServerEventScheduler.
The requestTimeout is defaulted to 15000 millis.
The Serializer and AxonServerConnectionManager are hard requirements and as such should be
provided.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Initializes aAxonServerEventScheduleras specified through this Builder.connectionManager(AxonServerConnectionManager axonServerConnectionManager) Sets theAxonServerConnectionManagerused to create connections between this application and an Axon Server instance.defaultContext(String defaultContext) Sets the default context for this event scheduler to connect to.eventSerializer(org.axonframework.serialization.Serializer eventSerializer) Sets theSerializerused to de-/serialize events.requestTimeout(long timeout, TimeUnit unit) Sets the timeout in which a confirmation of the scheduling interaction is expected.protected voidvalidate()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
requestTimeout
Sets the timeout in which a confirmation of the scheduling interaction is expected. Defaults to 15 seconds.- Parameters:
timeout- the time to wait at most for a confirmationunit- the unit in which the timeout is expressed- Returns:
- the current Builder instance, for fluent interfacing
-
eventSerializer
public AxonServerEventScheduler.Builder eventSerializer(org.axonframework.serialization.Serializer eventSerializer) Sets theSerializerused to de-/serialize events.- Parameters:
eventSerializer- aSerializerused to de-/serialize events- Returns:
- the current Builder instance, for fluent interfacing
-
connectionManager
public AxonServerEventScheduler.Builder connectionManager(AxonServerConnectionManager axonServerConnectionManager) Sets theAxonServerConnectionManagerused to create connections between this application and an Axon Server instance.- Parameters:
axonServerConnectionManager- anAxonServerConnectionManagerused to create connections between this application and an Axon Server instance- Returns:
- the current Builder instance, for fluent interfacing
-
defaultContext
Sets the default context for this event scheduler to connect to.- Parameters:
defaultContext- for this scheduler to connect to.- Returns:
- the current Builder instance, for fluent interfacing
-
build
Initializes aAxonServerEventScheduleras specified through this Builder.- Returns:
- a
AxonServerEventScheduleras specified through this Builder
-
validate
protected void validate() throws org.axonframework.common.AxonConfigurationException- Throws:
org.axonframework.common.AxonConfigurationException
-