Class EventPublisher
java.lang.Object
org.axonframework.disruptor.commandhandling.EventPublisher
- All Implemented Interfaces:
com.lmax.disruptor.EventHandler<CommandHandlingEntry>
public class EventPublisher
extends Object
implements com.lmax.disruptor.EventHandler<CommandHandlingEntry>
Component of the DisruptorCommandBus that stores and publishes events generated by the command's execution.
- Since:
- 2.0
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionEventPublisher(Executor executor, TransactionManager transactionManager, RollbackConfiguration rollbackConfiguration, int segmentId) Initializes the EventPublisher to publish Events to the giveneventStoreandeventBusfor aggregate of givenaggregateType. -
Method Summary
Modifier and TypeMethodDescriptionvoidonEvent(CommandHandlingEntry entry, long sequence, boolean endOfBatch)
-
Constructor Details
-
EventPublisher
public EventPublisher(Executor executor, TransactionManager transactionManager, RollbackConfiguration rollbackConfiguration, int segmentId) Initializes the EventPublisher to publish Events to the giveneventStoreandeventBusfor aggregate of givenaggregateType.- Parameters:
executor- The executor which schedules response reportingtransactionManager- The transaction manager that manages the transaction around event storage and publicationrollbackConfiguration- The configuration that indicates which exceptions should result in a UnitOfWorksegmentId- The ID of the segment this publisher should handle
-
-
Method Details
-
onEvent
- Specified by:
onEventin interfacecom.lmax.disruptor.EventHandler<CommandHandlingEntry>
-