Class AxonServerEventScheduler.Builder

java.lang.Object
org.axonframework.axonserver.connector.event.axon.AxonServerEventScheduler.Builder
Enclosing class:
AxonServerEventScheduler

public static class AxonServerEventScheduler.Builder extends Object
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 Details

    • Builder

      public Builder()
  • Method Details

    • requestTimeout

      public AxonServerEventScheduler.Builder requestTimeout(long timeout, TimeUnit unit)
      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 confirmation
      unit - 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 the Serializer used to de-/serialize events.
      Parameters:
      eventSerializer - a Serializer used to de-/serialize events
      Returns:
      the current Builder instance, for fluent interfacing
    • connectionManager

      public AxonServerEventScheduler.Builder connectionManager(AxonServerConnectionManager axonServerConnectionManager)
      Sets the AxonServerConnectionManager used to create connections between this application and an Axon Server instance.
      Parameters:
      axonServerConnectionManager - an AxonServerConnectionManager used to create connections between this application and an Axon Server instance
      Returns:
      the current Builder instance, for fluent interfacing
    • defaultContext

      public AxonServerEventScheduler.Builder defaultContext(String 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

      public AxonServerEventScheduler build()
      Initializes a AxonServerEventScheduler as specified through this Builder.
      Returns:
      a AxonServerEventScheduler as specified through this Builder
    • validate

      protected void validate() throws org.axonframework.common.AxonConfigurationException
      Throws:
      org.axonframework.common.AxonConfigurationException