Enum Class DirectEventProcessingStrategy

java.lang.Object
java.lang.Enum<DirectEventProcessingStrategy>
org.axonframework.eventhandling.DirectEventProcessingStrategy
All Implemented Interfaces:
Serializable, Comparable<DirectEventProcessingStrategy>, Constable, EventProcessingStrategy

public enum DirectEventProcessingStrategy extends Enum<DirectEventProcessingStrategy> implements EventProcessingStrategy
Event processing strategy that directly initiates event processing.
Author:
Rene de Waele
  • Enum Constant Details

  • Method Details

    • values

      public static DirectEventProcessingStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DirectEventProcessingStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • handle

      public void handle(@Nonnull List<? extends EventMessage<?>> events, @Nonnull Consumer<List<? extends EventMessage<?>>> processor)
      Description copied from interface: EventProcessingStrategy
      Handle the given batch of events. Once the strategy decides it is opportune to process the events it should pass them back to the given processor.

      Note that the strategy may call back to the processor more than once for a single invocation of this method. Also note that a batch of events passed back to the processor may be made up of events from different batches.

      Specified by:
      handle in interface EventProcessingStrategy
      Parameters:
      events - Events to be processed
      processor - Callback method on the processor that carries out the actual processing of events