Class TracingEventHandlingComponent
java.lang.Object
org.axonframework.messaging.eventhandling.DelegatingEventHandlingComponent
org.axonframework.messaging.eventhandling.tracing.TracingEventHandlingComponent
- All Implemented Interfaces:
DescribableComponent,MessageHandler,EventHandler,EventHandlingComponent
An
EventHandlingComponent that tracks the handling of events using a Span supplier.
It delegates the actual event handling to another EventHandlingComponent while tracking the events
processed.
- Since:
- 5.0.0
- Author:
- Allard Buijze, Mateusz Nowak, Mitchell Herrijgers, Steven van Beelen
-
Field Summary
Fields inherited from class org.axonframework.messaging.eventhandling.DelegatingEventHandlingComponent
delegate -
Constructor Summary
ConstructorsConstructorDescriptionTracingEventHandlingComponent(Function<EventMessage, Span> spanProvider, EventHandlingComponent delegate) Constructs the component with givendelegateto receive calls. -
Method Summary
Modifier and TypeMethodDescriptionhandle(EventMessage event, ProcessingContext context) Handles the giveneventwithin the givencontext.Methods inherited from class org.axonframework.messaging.eventhandling.DelegatingEventHandlingComponent
describeTo, sequenceIdentifierFor, supportedEvents, supports
-
Constructor Details
-
TracingEventHandlingComponent
public TracingEventHandlingComponent(@Nonnull Function<EventMessage, Span> spanProvider, @Nonnull EventHandlingComponent delegate) Constructs the component with givendelegateto receive calls.- Parameters:
spanProvider- The provider ofSpanto track the event handling.delegate- The instance to delegate calls to.
-
-
Method Details
-
handle
@Nonnull public MessageStream.Empty<Message> handle(@Nonnull EventMessage event, @Nonnull ProcessingContext context) Description copied from interface:EventHandler- Specified by:
handlein interfaceEventHandler- Overrides:
handlein classDelegatingEventHandlingComponent- Parameters:
event- The event to handle.context- The context to the giveneventis handled in.- Returns:
- An
empty streamcontaining nothing.
-