Package org.axonframework.eventhandling
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(List<? extends EventMessage<?>> events, Consumer<List<? extends EventMessage<?>>> processor) Handle the given batch ofevents.Returns the enum constant of this class with the specified name.static DirectEventProcessingStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
Singleton instance of theDirectEventProcessingStrategy.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
handle
public void handle(@Nonnull List<? extends EventMessage<?>> events, @Nonnull Consumer<List<? extends EventMessage<?>>> processor) Description copied from interface:EventProcessingStrategyHandle the given batch ofevents. Once the strategy decides it is opportune to process the events it should pass them back to the givenprocessor.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:
handlein interfaceEventProcessingStrategy- Parameters:
events- Events to be processedprocessor- Callback method on the processor that carries out the actual processing of events
-