Interface EventHandlingComponent
- All Superinterfaces:
DescribableComponent,EventHandler,MessageHandler
- All Known Implementing Classes:
AnnotatedEventHandlingComponent,DelegatingEventHandlingComponent,InterceptingEventHandlingComponent,SequenceCachingEventHandlingComponent,SequenceOverridingEventHandlingComponent,SequencingEventHandlingComponent,SimpleEventHandlingComponent,TracingEventHandlingComponent
Interface describing a group of
EventHandlers belonging to a single component.
As such, it allows registration of EventHandlers through the EventHandlerRegistry. Besides handling
and registration, it specifies which events it supports.
- Since:
- 3.0.0
- Author:
- Rene de Waele, Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescriptionsequenceIdentifierFor(EventMessage event, ProcessingContext context) Returns the sequence identifier for the givenevent.All supportedevents, referenced through aQualifiedName.default booleansupports(QualifiedName eventName) Checks whether the giveneventNameis supported by this component.Methods inherited from interface org.axonframework.common.infra.DescribableComponent
describeToMethods inherited from interface org.axonframework.messaging.eventhandling.EventHandler
handle
-
Method Details
-
supportedEvents
Set<QualifiedName> supportedEvents()All supportedevents, referenced through aQualifiedName.- Returns:
- All supported
events, referenced through aQualifiedName.
-
supports
Checks whether the giveneventNameis supported by this component.- Parameters:
eventName- The name of the event to check for support.- Returns:
trueif the giveneventNameis supported,falseotherwise.
-
sequenceIdentifierFor
@Nonnull Object sequenceIdentifierFor(@Nonnull EventMessage event, @Nonnull ProcessingContext context) Returns the sequence identifier for the givenevent. When two events have the same sequence identifier (as defined by their equals method), they will be executed sequentially. Important: AllEventHandlersfor the sameQualifiedNamewithin a singleEventHandlingComponentmust return the same sequence identifier for a given event. Mixing different sequence identifiers within the scope of a singleEventHandlingComponentis not supported and may lead to undefined behavior.- Parameters:
event- The event for which to get the sequencing identifier.context- The processing context in which the event is being handled.- Returns:
- A sequence identifier for the given event.
-