Class SagaProcessorDefinition.Selector

java.lang.Object
org.axonframework.extension.spring.config.SagaProcessorDefinition.Selector
Enclosing class:
SagaProcessorDefinition

public static final class SagaProcessorDefinition.Selector extends Object
The step naming the processor mode the customization is written for, and the customization itself.
  • Method Details

    • whenPooledStreaming

      Completes the definition with a customization applied only when the selected processor runs in pooled streaming mode, which is the default for a Saga.

      Naming the mode does not select it. The processor's mode comes from axon.eventhandling.processors.<name>.mode or a matching EventProcessorDefinition; this only says which configuration the customization was written against. Use customized(UnaryOperator) for settings both modes share.

      Parameters:
      customization - the customization to apply
      Returns:
      the completed definition, to be declared as a Spring bean
    • whenSubscribing

      Completes the definition with a customization applied only when the selected processor runs in subscribing mode.

      Naming the mode does not select it. Switch a Saga to a subscribing processor with axon.eventhandling.processors.<name>.mode=subscribing; this only says which configuration the customization was written against. Use customized(UnaryOperator) for settings both modes share.

      Parameters:
      customization - the customization to apply
      Returns:
      the completed definition, to be declared as a Spring bean
    • customized

      Completes the definition with a customization applied whatever mode the selected processor runs in, covering the settings both modes share: the error handler, the unit of work factory, and extensions.

      The customization must return the configuration it was given. These configuration objects are mutable builders whose setters return this, so returning anything else replaces a pooled streaming or subscribing configuration with a plain one and is rejected.

      Parameters:
      customization - the customization to apply
      Returns:
      the completed definition, to be declared as a Spring bean